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

(cherry picked from commit ef794f390c)
This commit is contained in:
pandiyan
2026-07-03 18:25:08 +05:30
committed by Mergify
parent a39753ee08
commit c964811293

View File

@@ -668,6 +668,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;