Don't validate serial nos while cancelling the transaction

This commit is contained in:
Nabin Hait 2018-02-26 16:39:06 +05:30
parent 127c61e930
commit 3799f8bec9

View File

@ -187,7 +187,7 @@ def process_serial_no(sle):
update_serial_nos(sle, item_det)
def validate_serial_no(sle, item_det):
if item_det.has_serial_no==0:
if item_det.has_serial_no==0 and sle.is_cancelled == "No":
if sle.serial_no:
frappe.throw(_("Item {0} is not setup for Serial Nos. Column must be blank").format(sle.item_code),
SerialNoNotRequiredError)