mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
Bug - Add batch while creating serial nos (#14559)
This commit is contained in:
@@ -306,6 +306,7 @@ def auto_make_serial_nos(args):
|
|||||||
sr.via_stock_ledger = True
|
sr.via_stock_ledger = True
|
||||||
sr.item_code = args.get('item_code')
|
sr.item_code = args.get('item_code')
|
||||||
sr.warehouse = args.get('warehouse') if args.get('actual_qty', 0) > 0 else None
|
sr.warehouse = args.get('warehouse') if args.get('actual_qty', 0) > 0 else None
|
||||||
|
sr.batch_no = args.get('batch_no')
|
||||||
sr.location = args.get('location')
|
sr.location = args.get('location')
|
||||||
sr.save(ignore_permissions=True)
|
sr.save(ignore_permissions=True)
|
||||||
elif args.get('actual_qty', 0) > 0:
|
elif args.get('actual_qty', 0) > 0:
|
||||||
@@ -325,10 +326,10 @@ def make_serial_no(serial_no, args):
|
|||||||
sr.warehouse = None
|
sr.warehouse = None
|
||||||
sr.dont_update_if_missing.append("warehouse")
|
sr.dont_update_if_missing.append("warehouse")
|
||||||
sr.flags.ignore_permissions = True
|
sr.flags.ignore_permissions = True
|
||||||
|
|
||||||
sr.serial_no = serial_no
|
sr.serial_no = serial_no
|
||||||
sr.item_code = args.get('item_code')
|
sr.item_code = args.get('item_code')
|
||||||
sr.company = args.get('company')
|
sr.company = args.get('company')
|
||||||
|
sr.batch_no = args.get('batch_no')
|
||||||
sr.via_stock_ledger = args.get('via_stock_ledger') or True
|
sr.via_stock_ledger = args.get('via_stock_ledger') or True
|
||||||
sr.asset = args.get('asset')
|
sr.asset = args.get('asset')
|
||||||
sr.location = args.get('location')
|
sr.location = args.get('location')
|
||||||
|
|||||||
Reference in New Issue
Block a user