mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-16 16:08:39 +00:00
fix: pass child_docname in server bulk price apply so the rate lock is reachable
The server-side _apply_price_list builds its item ctx from as_dict(), which omits the child_docname key the desk (JS) callers add, so the maintain-same-rate lock in apply_price_list could not match rows in that path. Pass child_docname for consistency with the desk callers.
This commit is contained in:
@@ -547,7 +547,9 @@ class TransactionBase(StatusUpdater):
|
||||
from erpnext.stock.get_item_details import apply_price_list
|
||||
|
||||
args = {
|
||||
"items": [x.as_dict() for x in self.items],
|
||||
# pass child_docname so the maintain-same-rate lock in apply_price_list can
|
||||
# match each row, consistent with the desk (JS) callers
|
||||
"items": [{**x.as_dict(), "child_docname": x.name} for x in self.items],
|
||||
"customer": self.customer or self.party_name,
|
||||
"quotation_to": self.quotation_to,
|
||||
"customer_group": self.customer_group,
|
||||
|
||||
Reference in New Issue
Block a user