From d0ec3e6101fd4e30c4e32e3bcd7a7a50910a95fc Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 12 Aug 2011 11:05:04 +0530 Subject: [PATCH] bom fix --- production/doctype/workstation/workstation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/doctype/workstation/workstation.py b/production/doctype/workstation/workstation.py index aaa490837f..45851de3e2 100644 --- a/production/doctype/workstation/workstation.py +++ b/production/doctype/workstation/workstation.py @@ -25,7 +25,7 @@ class DocType: def update_bom_operation(self): bom_list = sql(" select DISTINCT parent from `tabBOM Operation` where workstation = '%s'" % self.doc.name) for bom_no in bom_list: - sql("update `tabBOM Operation` set hour_rate = '%s' where parent = '%s' and workstation = '%s'"%( self.doc.hour_rate, bom_no, self.doc.name)) + sql("update `tabBOM Operation` set hour_rate = '%s' where parent = '%s' and workstation = '%s'"%( self.doc.hour_rate, bom_no[0], self.doc.name)) def on_update(self): set(self.doc, 'overhead', flt(self.doc.hour_rate_electricity) + flt(self.doc.hour_rate_consumable) + flt(self.doc.hour_rate_rent))