fix: throw error if no serial numbers are found in Pick List (#21915)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
parent
56357fafeb
commit
d28854b3c2
@ -24,6 +24,9 @@ class PickList(Document):
|
||||
for item in self.locations:
|
||||
if not frappe.get_cached_value('Item', item.item_code, 'has_serial_no'):
|
||||
continue
|
||||
if not item.serial_no:
|
||||
frappe.throw(_("Row #{0}: {1} does not have any available serial numbers in {2}".format(
|
||||
frappe.bold(item.idx), frappe.bold(item.item_code), frappe.bold(item.warehouse))))
|
||||
if len(item.serial_no.split('\n')) == item.picked_qty:
|
||||
continue
|
||||
frappe.throw(_('For item {0} at row {1}, count of serial numbers does not match with the picked quantity')
|
||||
|
Loading…
x
Reference in New Issue
Block a user