fix: function name [is_work_order_stopped -> is_work_order_closed]
This commit is contained in:
parent
6954dd6329
commit
68dc42fb1f
@ -28,7 +28,7 @@ frappe.ui.form.on('Job Card', {
|
||||
frappe.flags.resume_job = 0;
|
||||
let has_items = frm.doc.items && frm.doc.items.length;
|
||||
|
||||
if (frm.doc.__onload.work_order_stopped) {
|
||||
if (frm.doc.__onload.work_order_closed) {
|
||||
frm.disable_save();
|
||||
return;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ class JobCard(Document):
|
||||
def onload(self):
|
||||
excess_transfer = frappe.db.get_single_value("Manufacturing Settings", "job_card_excess_transfer")
|
||||
self.set_onload("job_card_excess_transfer", excess_transfer)
|
||||
self.set_onload("work_order_stopped", self.is_work_order_stopped())
|
||||
self.set_onload("work_order_closed", self.is_work_order_closed())
|
||||
|
||||
def validate(self):
|
||||
self.validate_time_logs()
|
||||
@ -549,10 +549,10 @@ class JobCard(Document):
|
||||
.format(message, bold(row.operation), bold(self.operation)), OperationSequenceError)
|
||||
|
||||
def validate_work_order(self):
|
||||
if self.is_work_order_stopped():
|
||||
if self.is_work_order_closed():
|
||||
frappe.throw(_("You can't make any changes to Job Card since Work Order is stopped."))
|
||||
|
||||
def is_work_order_stopped(self):
|
||||
def is_work_order_closed(self):
|
||||
if self.work_order:
|
||||
status = frappe.get_value('Work Order', self.work_order)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user