fix: Get accounting dimensions only if user has access
This commit is contained in:
parent
5162b7457f
commit
da629810ad
@ -65,6 +65,9 @@ $.extend(erpnext, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get_dimension_filters: async function() {
|
get_dimension_filters: async function() {
|
||||||
|
if (!frappe.boot.user.can_read.includes('Accounting Dimension')) {
|
||||||
|
return
|
||||||
|
}
|
||||||
let dimensions = await frappe.db.get_list('Accounting Dimension', {
|
let dimensions = await frappe.db.get_list('Accounting Dimension', {
|
||||||
fields: ['label', 'fieldname', 'document_type'],
|
fields: ['label', 'fieldname', 'document_type'],
|
||||||
filters: {
|
filters: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user