fix: skip item prices tab render for users without item price read access

This commit is contained in:
pandiyan
2026-07-03 18:25:08 +05:30
parent 8c7b2f4d3c
commit ef794f390c

View File

@@ -828,6 +828,13 @@ $.extend(erpnext.item, {
render_item_prices: function (frm) {
if (frm.doc.__islocal) return;
if (!frappe.model.can_read("Item Price")) {
frm.toggle_display("prices_html", false);
return;
}
frm.toggle_display("prices_html", true);
const requested_item = frm.doc.name;
const container = frm.fields_dict["prices_html"].$wrapper;