From 7e3a98ba334b0f5c965459848d6b79892ddec970 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Mon, 17 Jun 2019 12:44:49 +0530 Subject: [PATCH] fix: Is group filter fixes in dimensions --- erpnext/public/js/utils/dimension_tree_filter.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/utils/dimension_tree_filter.js b/erpnext/public/js/utils/dimension_tree_filter.js index 16c1d4d248..f31b578b0b 100644 --- a/erpnext/public/js/utils/dimension_tree_filter.js +++ b/erpnext/public/js/utils/dimension_tree_filter.js @@ -14,9 +14,13 @@ erpnext.doctypes_with_dimensions.forEach((doctype) => { onload: function(frm) { dimension_filters.then((dimensions) => { dimensions.forEach((dimension) => { - frm.set_query(dimension['fieldname'],{ - "is_group": 0 - }); + frappe.model.with_doctype(dimension['document_type'], () => { + if (frappe.meta.has_field(dimension['document_type'], 'is_group')) { + frm.set_query(dimension['fieldname'],{ + "is_group": 0 + }); + } + }) }); }); }