fix(patch): update BOMs to have correct transfer_material_against

This commit is contained in:
Ankush Menat 2022-01-28 13:00:15 +05:30 committed by Ankush Menat
parent 86efa0dbfd
commit e4c220053f
2 changed files with 12 additions and 0 deletions

View File

@ -334,3 +334,4 @@ erpnext.patches.v14_0.delete_hospitality_doctypes # 20-01-2022
erpnext.patches.v14_0.delete_agriculture_doctypes
erpnext.patches.v14_0.rearrange_company_fields
erpnext.patches.v14_0.update_leave_notification_template
erpnext.patches.v13_0.update_sane_transfer_against

View File

@ -0,0 +1,11 @@
import frappe
def execute():
bom = frappe.qb.DocType("BOM")
(frappe.qb
.update(bom)
.set(bom.transfer_material_against, "Work Order")
.where(bom.with_operations == 0)
).run()