Merge pull request #26211 from deepeshgarg007/include_dimension_filter

fix: Account filter not working with accounting dimension filter
This commit is contained in:
Deepesh Garg 2021-06-24 19:55:12 +05:30 committed by GitHub
commit 970d2af7ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class AccountingDimension(Document):
def validate(self):
if self.document_type in core_doctypes_list + ('Accounting Dimension', 'Project',
'Cost Center', 'Accounting Dimension Detail', 'Company') :
'Cost Center', 'Accounting Dimension Detail', 'Company', 'Account') :
msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type)
frappe.throw(msg)

View File

@ -222,7 +222,7 @@ def get_gl_entries(filters, accounting_dimensions):
def get_conditions(filters):
conditions = []
if filters.get("account") and not filters.get("include_dimensions"):
if filters.get("account"):
filters.account = get_accounts_with_children(filters.account)
conditions.append("account in %(account)s")