fix: Is group filter fixes in dimensions

This commit is contained in:
deepeshgarg007 2019-06-17 12:44:49 +05:30
parent b095d0a0c5
commit 7e3a98ba33

View File

@ -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
});
}
})
});
});
}