From 42a411398a2ce42fbd6c0af65eb72acefba4265a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 11 Jan 2012 16:57:44 +0530 Subject: [PATCH] Error fixed in patches --- .../patches/jan_mar_2012/production_cleanup.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/erpnext/patches/jan_mar_2012/production_cleanup.py b/erpnext/patches/jan_mar_2012/production_cleanup.py index 918decc1a34..a7dd96d4584 100644 --- a/erpnext/patches/jan_mar_2012/production_cleanup.py +++ b/erpnext/patches/jan_mar_2012/production_cleanup.py @@ -6,9 +6,10 @@ def execute(): # Production Planning Tool #--------------------------------------------------------------- - delete_doc('DocType', 'PP Detail') - delete_doc('DocType', 'PP SO Detail') - delete_doc('DocType', 'Production Planning Tool') + #delete_doc('DocType', 'PP Detail') + #delete_doc('DocType', 'PP SO Detail') + #delete_doc('DocType', 'Production Planning Tool') + sql("delete from `tabDocField` where parent in ('Production Planning Tool', 'PP Detail', 'PP SO Detail')") reload_doc('production', 'doctype', 'production_planning_tool') reload_doc('production', 'doctype', 'pp_detail') @@ -28,9 +29,9 @@ def execute(): # Bill Of Materials #--------------------------------------------------------------- reload_doc('production', 'doctype', 'bill_of_materials') - relaod_doc('production', 'doctype', 'bom_material') - relaod_doc('production', 'doctype', 'bom_operation') - relaod_doc('production', 'doctype', 'flat_bom_detail') + reload_doc('production', 'doctype', 'bom_material') + reload_doc('production', 'doctype', 'bom_operation') + reload_doc('production', 'doctype', 'flat_bom_detail') #copy values sql("""update `tabBill Of Materials` set rm_cost_as_per = 'Valuation Rate', @@ -38,7 +39,7 @@ def execute(): sql("update `tabBOM Material` set rate = moving_avg_rate, amount = amount_as_per_mar") - sql("update `tabFlat Bom Detail` set rate = moving_average_rate, amount = amount_as_per_mar") + sql("update `tabFlat Bom Detail` set rate = moving_avg_rate, amount = amount_as_per_mar")