From e14124198da451faaf8c4a967ee70298e63fc1cd Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 12 Oct 2015 15:07:52 +0530 Subject: [PATCH] minor fix, escape % char --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index da9650e5d07..8728ac91ad0 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -175,7 +175,7 @@ def get_pricing_rules(args): if parent_groups: if allow_blank: parent_groups.append('') condition = " ifnull("+field+", '') in ('" + \ - "', '".join([d.replace("'", "\\'").replace('"', '\\"') for d in parent_groups])+"')" + "', '".join([d.replace("'", "\\'").replace('"', '\\"').replace("%", "%%") for d in parent_groups])+"')" return condition