fix: ignore mandatory fields while creating WO from SO (#28772) (#28774)

If fields are made mandatory from customizations the WO creation simply
fails.

(cherry picked from commit 6efbbb1058)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2021-12-07 16:49:43 +05:30
committed by GitHub
parent f9742394f3
commit 28b84ad7d6

View File

@@ -1024,6 +1024,7 @@ def make_work_orders(items, sales_order, company, project=None):
description=i['description']
)).insert()
work_order.set_work_order_operations()
work_order.flags.ignore_mandatory = True
work_order.save()
out.append(work_order)