mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
call item on_update from UOM Replace Utility
This commit is contained in:
@@ -66,7 +66,7 @@ class DocType:
|
|||||||
|
|
||||||
if cstr(d.uom) == cstr(self.doc.stock_uom):
|
if cstr(d.uom) == cstr(self.doc.stock_uom):
|
||||||
if flt(d.conversion_factor) != 1:
|
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
|
raise Exception
|
||||||
# else set uom_exist as true
|
# else set uom_exist as true
|
||||||
uom_exist='true'
|
uom_exist='true'
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ class DocType:
|
|||||||
msgprint("Please Enter an Item.")
|
msgprint("Please Enter an Item.")
|
||||||
raise Exception
|
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):
|
if not cstr(self.doc.new_stock_uom):
|
||||||
msgprint("Please Enter New Stock UOM.")
|
msgprint("Please Enter New Stock UOM.")
|
||||||
raise Exception
|
raise Exception
|
||||||
@@ -119,3 +115,5 @@ class DocType:
|
|||||||
|
|
||||||
# update bin
|
# update bin
|
||||||
self.update_bin()
|
self.update_bin()
|
||||||
|
|
||||||
|
get_obj("Item", self.doc.item_code).on_update()
|
||||||
Reference in New Issue
Block a user