Check Meta before Toggling Conversion Factor (#12237)
If it has been customized so as to set the conversion factor to read only, `toggle_conversion_factor` should respect that setting.
This commit is contained in:
parent
df0dd8be5f
commit
2469095a13
@ -693,7 +693,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
// toggle read only property for conversion factor field if the uom and stock uom are same
|
||||
if(this.frm.get_field('items').grid.fields_map.conversion_factor) {
|
||||
this.frm.fields_dict.items.grid.toggle_enable("conversion_factor",
|
||||
(item.uom != item.stock_uom)? true: false);
|
||||
((item.uom != item.stock_uom) && !frappe.meta.get_docfield(cur_frm.fields_dict.items.grid.doctype, "conversion_factor").read_only)? true: false);
|
||||
}
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user