Merge pull request #23370 from prssanna/account-user-permission

fix: apply user permissions in tax accounts query
This commit is contained in:
rohitwaghchaure 2020-09-22 10:34:35 +05:30 committed by GitHub
commit 9e6d377eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,9 +165,14 @@ def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
AND company = %(company)s
AND account_currency = %(currency)s
AND `{searchfield}` LIKE %(txt)s
{mcond}
ORDER BY idx DESC, name
LIMIT %(offset)s, %(limit)s
""".format(account_type_condition=account_type_condition, searchfield=searchfield),
""".format(
account_type_condition=account_type_condition,
searchfield=searchfield,
mcond=get_match_cond(doctype)
),
dict(
account_types=filters.get("account_type"),
company=filters.get("company"),