Item managed batch-wise, can not be reconciled through stock reconciliation

This commit is contained in:
Nabin Hait 2014-05-08 19:08:06 +05:30
parent 844dd36ff9
commit 5d070753fd

View File

@ -106,6 +106,11 @@ class StockReconciliation(StockController):
if item.has_serial_no == "Yes":
raise frappe.ValidationError, _("Serialized Item {0} cannot be updated using Stock Reconciliation").format(item_code)
# item managed batch-wise not allowed
if item.has_batch_no == "Yes":
frappe.throw(_("Item: {0} managed batch-wise, can not be reconciled using \
Stock Reconciliation, instead use Stock Entry").format(item_code))
# docstatus should be < 2
validate_cancelled_item(item_code, item.docstatus, verbose=0)