[fix] [minor] changed uom replace utility message

This commit is contained in:
Nabin Hait 2013-09-06 13:23:33 +05:30
parent 7ec9468b8d
commit e33d0be32c

View File

@ -62,12 +62,11 @@ class DocType(DocListController):
def check_stock_uom_with_bin(self): def check_stock_uom_with_bin(self):
if not self.doc.fields.get("__islocal"): if not self.doc.fields.get("__islocal"):
bin = webnotes.conn.sql("select stock_uom from `tabBin` where item_code = %s", bin_uom = webnotes.conn.get_value("Bin", {"item_code": self.doc.name}, "stock_uom")
self.doc.name) if self.doc.stock_uom and bin_uom and cstr(bin_uom) != cstr(self.doc.stock_uom):
if self.doc.stock_uom and bin and cstr(bin[0][0]) \ webnotes.throw(_("Default Unit of Measure can not be changed directly \
and cstr(bin[0][0]) != cstr(self.doc.stock_uom): because you have already made some transaction(s) with another UOM. \
msgprint(_("Please Update Stock UOM with the help of Stock UOM Replace Utility."), To change default UOM, use 'UOM Replace Utility' tool under Stock module."))
raise_exception=1)
def validate_conversion_factor(self): def validate_conversion_factor(self):
check_list = [] check_list = []