Skip to content

Commit

Permalink
fix: editable price list rate field in sales transactions (frappe#27455)
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib authored Sep 13, 2021
1 parent bab644a commit a5baf90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion erpnext/selling/sales_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,12 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran
var editable_price_list_rate = cint(frappe.defaults.get_default("editable_price_list_rate"));

if(df && editable_price_list_rate) {
df.read_only = 0;
const parent_field = frappe.meta.get_parentfield(this.frm.doc.doctype, this.frm.doc.doctype + " Item");
if (!this.frm.fields_dict[parent_field]) return;

this.frm.fields_dict[parent_field].grid.update_docfield_property(
'price_list_rate', 'read_only', 0
);
}
}

Expand Down

0 comments on commit a5baf90

Please sign in to comment.