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:
Jatin3128
2026-07-30 18:40:06 +05:30
parent 83efc57416
commit ec83cab468

View File

@@ -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,