mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-19 09:28:46 +00:00
fix: skip item prices tab render for users without item price read access
(cherry picked from commit ef794f390c)
This commit is contained in:
@@ -668,6 +668,13 @@ $.extend(erpnext.item, {
|
|||||||
|
|
||||||
render_item_prices: function (frm) {
|
render_item_prices: function (frm) {
|
||||||
if (frm.doc.__islocal) return;
|
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 requested_item = frm.doc.name;
|
||||||
const container = frm.fields_dict["prices_html"].$wrapper;
|
const container = frm.fields_dict["prices_html"].$wrapper;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user