mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
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:
@@ -24,6 +24,9 @@ class PickList(Document):
|
|||||||
for item in self.locations:
|
for item in self.locations:
|
||||||
if not frappe.get_cached_value('Item', item.item_code, 'has_serial_no'):
|
if not frappe.get_cached_value('Item', item.item_code, 'has_serial_no'):
|
||||||
continue
|
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:
|
if len(item.serial_no.split('\n')) == item.picked_qty:
|
||||||
continue
|
continue
|
||||||
frappe.throw(_('For item {0} at row {1}, count of serial numbers does not match with the picked quantity')
|
frappe.throw(_('For item {0} at row {1}, count of serial numbers does not match with the picked quantity')
|
||||||
|
|||||||
Reference in New Issue
Block a user