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

If fields are made mandatory from customizations the WO creation simply
fails.
This commit is contained in:
Ankush Menat 2021-12-07 16:26:14 +05:30 committed by GitHub
parent 3e1591c145
commit 6efbbb1058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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