diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index a2ed86da15..a546799a5d 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -149,7 +149,7 @@ class AccountsReceivableReport(object): if not account_map: frappe.throw(_("No Customer Accounts found.")) else: - accounts_list = ['"{0}"'.format(ac.replace('"', '\"')) for ac in account_map] + accounts_list = ["'{0}'".format(frappe.db.escape(ac)) for ac in account_map] conditions.append("account in ({0})".format(", ".join(accounts_list))) return " and ".join(conditions), values