Merge pull request #17959 from deepeshgarg007/dimension-fixes

fix: Is group filter fixes in dimensions
This commit is contained in:
Deepesh Garg 2019-06-18 08:37:32 +05:30 committed by GitHub
commit c38e0bb75c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,8 +14,12 @@ 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
});
}
});
});
});