From fd03762445402f6cf79139d5f06929903e02bc9d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 6 Aug 2012 13:18:32 +0530 Subject: [PATCH] call item on_update from UOM Replace Utility --- erpnext/stock/doctype/item/item.py | 2 +- .../stock_uom_replace_utility.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 9e00dc12bf..c21b552232 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -66,7 +66,7 @@ class DocType: if cstr(d.uom) == cstr(self.doc.stock_uom): if flt(d.conversion_factor) != 1: - msgprint("Conversion Fator of UOM : %s should be equal to 1. As UOM : %s is Stock UOM of Item: %s." % ( cstr(d.uom), cstr(d.uom), cstr(self.doc.name))) + msgprint("Conversion Factor of UOM : %s should be equal to 1. As UOM : %s is Stock UOM of Item: %s." % ( cstr(d.uom), cstr(d.uom), cstr(self.doc.name))) raise Exception # else set uom_exist as true uom_exist='true' diff --git a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py index 8414f8afbe..31188e876e 100644 --- a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py +++ b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py @@ -44,10 +44,6 @@ class DocType: if not cstr(self.doc.item_code): msgprint("Please Enter an Item.") raise Exception - - if not cstr(self.doc.current_stock_uom): - msgprint("There is no Current Stock UOM for Item Code" + cstr(self.doc.item_code)) - raise Exception if not cstr(self.doc.new_stock_uom): msgprint("Please Enter New Stock UOM.") @@ -118,4 +114,6 @@ class DocType: self.update_stock_ledger_entry() # update bin - self.update_bin() \ No newline at end of file + self.update_bin() + + get_obj("Item", self.doc.item_code).on_update() \ No newline at end of file