Merge pull request #8183 from neilLasrado/minor-fix

Fixed issue with misleading error message on Stock Entry creation of Serialized Items
This commit is contained in:
Nabin Hait 2017-03-28 18:08:42 +05:30 committed by GitHub
commit 11812db5e8

View File

@ -443,7 +443,7 @@ def get_valuation_rate(item_code, warehouse, voucher_type, voucher_no, allow_zer
if not allow_zero_rate and not valuation_rate \ if not allow_zero_rate and not valuation_rate \
and cint(frappe.db.get_value("Accounts Settings", None, "auto_accounting_for_stock")): and cint(frappe.db.get_value("Accounts Settings", None, "auto_accounting_for_stock")):
frappe.local.message_log = []
frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a sample item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry").format(item_code, voucher_type, voucher_no)) frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a sample item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry").format(item_code, voucher_type, voucher_no))
return valuation_rate return valuation_rate