fix(patch): update BOMs to have correct transfer_material_against

(cherry picked from commit e4c220053f)
This commit is contained in:
Ankush Menat
2022-01-28 13:00:15 +05:30
committed by Ankush Menat
parent 4e14d28564
commit de01f0f364
2 changed files with 12 additions and 0 deletions

View File

@@ -345,3 +345,4 @@ erpnext.patches.v13_0.agriculture_deprecation_warning
erpnext.patches.v13_0.update_maintenance_schedule_field_in_visit
erpnext.patches.v13_0.hospitality_deprecation_warning
erpnext.patches.v13_0.delete_bank_reconciliation_detail
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()