Closed casesolved-co-uk closed 1 month ago
Appears to be introduced here: https://github.com/frappe/erpnext/commit/333c62de72b1e47a15285b463ec6715cbf46bc40 @rohitwaghchaure
@toofun666 Can you confirm you have seen this?
@toofun666 Can you confirm you have seen this?
Sure thing. A few glitches remain but mostly the mystery's been solved. Need more effort though but we can push this.
Information about bug
See tests reproducing the issue: https://github.com/frappe/erpnext/pull/41814
It appears
get_available_materials
has been poorly written and not properly tested.The code on inspection tries to remove a serial number from a list that has not been populated.
item_data.serial_nos.remove(serial_no)
and yet serial_nos is initialised above to an empty list:{"item_details": row, "batch_details": defaultdict(float), "qty": 0, "serial_nos": []}
Module
stock, manufacturing
Version
"erpnext": "15.22.2", "frappe": "15.26.0",
Installation method
None
Relevant log output / Stack trace / Full Error Message.
Route
Traceback
Request Data
Response Data