fix: WIP needs to be set before submit on skip_transfer (#26500)

This commit is contained in:
Noah Jacob 2021-07-15 16:50:41 +05:30 committed by GitHub
parent d319e10883
commit 26a9d38547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,7 +239,7 @@ class WorkOrder(Document):
self.create_serial_no_batch_no() self.create_serial_no_batch_no()
def on_submit(self): def on_submit(self):
if not self.wip_warehouse: if not self.wip_warehouse and not self.skip_transfer:
frappe.throw(_("Work-in-Progress Warehouse is required before Submit")) frappe.throw(_("Work-in-Progress Warehouse is required before Submit"))
if not self.fg_warehouse: if not self.fg_warehouse:
frappe.throw(_("For Warehouse is required before Submit")) frappe.throw(_("For Warehouse is required before Submit"))