fix: Ignore permissions while fetching module settings properties

This commit is contained in:
Nabin Hait
2024-04-07 11:33:40 +05:30
parent 8b9079d62e
commit f61faa85a1
7 changed files with 65 additions and 18 deletions

View File

@@ -252,9 +252,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
}
toggle_enable_for_stock_uom(field) {
frappe.db.get_single_value('Stock Settings', field)
.then(value => {
this.frm.fields_dict["items"].grid.toggle_enable("stock_qty", value);
frappe.call({
method: 'erpnext.stock.doctype.stock_settings.stock_settings.get_enable_stock_uom_editing',
callback: (r) => {
if (r.message) {
var value = r.message[field];
this.frm.fields_dict["items"].grid.toggle_enable("stock_qty", value);
}
}
});
}