mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 13:41:47 +00:00
* fix(stock): fall back to current date/time for serial and batch bundle posting datetime Pick List has no posting_date/posting_time fields, so creating or updating a Serial and Batch Bundle from a Pick List row crashed with "TypeError: combine() argument 1 must be datetime.date, not None". Fall back to today/now when the parent voucher doesn't carry its own posting date. Fixes #56951 * fix(stock): accept a plain dict for add_serial_batch_ledgers' doc and child_row The whitelisted add_serial_batch_ledgers only converted child_row into an attribute-accessible frappe._dict when it arrived as a JSON string, and doc's type hint only allowed Document | str. Frappe's JSON API delivers both as plain dicts (see frappe.app.make_form_dict, which parses the request body with orjson and only wraps the top-level dict, not nested values), so every real request was rejected before the handler body ever ran: first with a FrappeTypeError on doc, and once that's fixed, with an AttributeError on child_row.serial_and_batch_bundle. parse_json already wraps a plain dict in frappe._dict (and leaves a real Document instance untouched), so routing child_row through it unconditionally fixes both.