From 443426277b6b6369dfd25b1be8a0c64adc5bd5e4 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 12 Jun 2012 14:17:44 +0530 Subject: [PATCH] sync purchase invoice item, purchase_receipt_item and purchase order item before patch --- erpnext/patches/june_2012/copy_uom_for_pur_inv_item.py | 4 ++++ 1 file changed, 4 insertions(+) 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 8c43b277b5..83012e8f78 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,7 +1,11 @@ def execute(): import webnotes + + # perform sync import webnotes.model.sync webnotes.model.sync.sync('buying', 'purchase_order_item') webnotes.model.sync.sync('accounts', 'purchase_invoice_item') + webnotes.model.sync.sync('stock', 'purchase_receipt_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