mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-13 17:53:49 +00:00
fix: hide close button on WO if WO is completed
(cherry picked from commit 6e17ccf499)
This commit is contained in:
@@ -664,7 +664,7 @@ erpnext.work_order = {
|
|||||||
set_custom_buttons: function (frm) {
|
set_custom_buttons: function (frm) {
|
||||||
var doc = frm.doc;
|
var doc = frm.doc;
|
||||||
|
|
||||||
if (doc.docstatus === 1 && doc.status !== "Closed") {
|
if (doc.docstatus === 1 && !["Closed", "Completed"].includes(doc.status)) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Close"),
|
__("Close"),
|
||||||
function () {
|
function () {
|
||||||
@@ -674,9 +674,6 @@ erpnext.work_order = {
|
|||||||
},
|
},
|
||||||
__("Status")
|
__("Status")
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
if (doc.docstatus === 1 && !["Closed", "Completed"].includes(doc.status)) {
|
|
||||||
if (doc.status != "Stopped" && doc.status != "Completed") {
|
if (doc.status != "Stopped" && doc.status != "Completed") {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Stop"),
|
__("Stop"),
|
||||||
|
|||||||
Reference in New Issue
Block a user