From 39712b5e1d0d36de0ecd93b3300462609fa5a84c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 14 Dec 2016 14:12:20 +0530 Subject: [PATCH] [Fix] Pricing rule issue --- 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 b36898a807..3b3184c92b 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -126,7 +126,7 @@ def get_pricing_rule_for_item(args): }) if args.ignore_pricing_rule or not args.item_code: - if args.name and args.get("pricing_rule"): + if frappe.db.exists(args.doctype, args.name) and args.get("pricing_rule"): item_details = remove_pricing_rule(args, item_details) return item_details