You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a Quotation, when adding an Item row, the get_item_details method is called.
When Pricing Rules exist for the given item_code, a list of their names is loaded into a property called pricing_rules.
However, there is also a pricing_rules field (table) in the parent document (Quotation).
Because the child: item, parameter was removed in #38608 from the frm.call params, this means that the else branch of the callback is executed, which calls frm.set_value({ ..., "pricing_rules": "..." }). This breaks the pricing_rules table in the parent document, silently with an error visible in the console.
if($.isPlainObject(r.message)){if(opts.child){// Copy all fields, even the qty field that PR #38608 wants to preserve.}else{// update parent docme.set_value(r.message);// This sets the value of the `pricing_rules` TABLE with a string value (bad)}
@rtdany10 is working on a fix right now if I'm not mistaken? (just a revert)
/cc @s-aga-r
Information about bug
In a Quotation, when adding an Item row, the
get_item_details
method is called.When Pricing Rules exist for the given item_code, a list of their names is loaded into a property called
pricing_rules
.However, there is also a
pricing_rules
field (table) in the parent document (Quotation).Because the
child: item,
parameter was removed in #38608 from thefrm.call
params, this means that theelse
branch of the callback is executed, which callsfrm.set_value({ ..., "pricing_rules": "..." })
. This breaks thepricing_rules
table in the parent document, silently with an error visible in the console.https://github.com/frappe/frappe/blob/174e24f1597e6c3834a6888c2e7d2a7cabe69065/frappe/public/js/frappe/form/form.js#L1755-L1758
0156339
Module
buying, selling
Version
develop
The text was updated successfully, but these errors were encountered: