diff --git a/erpnext/patches/june_2012/copy_uom_for_pur_inv_item.py b/erpnext/patches/june_2012/copy_uom_for_pur_inv_item.py index d3127170a4..8c43b277b5 100644 --- a/erpnext/patches/june_2012/copy_uom_for_pur_inv_item.py +++ b/erpnext/patches/june_2012/copy_uom_for_pur_inv_item.py @@ -1,4 +1,7 @@ def execute(): import webnotes + import webnotes.model.sync + webnotes.model.sync.sync('buying', 'purchase_order_item') + webnotes.model.sync.sync('accounts', 'purchase_invoice_item') webnotes.conn.sql("update `tabPurchase Invoice Item` t1, `tabPurchase Order Item` t2 set t1.uom = t2.uom where ifnull(t1.po_detail, '') != '' and t1.po_detail = t2.name") webnotes.conn.sql("update `tabPurchase Invoice Item` t1, `tabPurchase Receipt Item` t2 set t1.uom = t2.uom where ifnull(t1.pr_detail, '') != '' and t1.pr_detail = t2.name") \ No newline at end of file