From 303639db764672ba9347475419c347aad6d06e02 Mon Sep 17 00:00:00 2001 From: Poranut Chollavorn Date: Mon, 22 Jun 2020 10:24:40 +0000 Subject: [PATCH] fix: use name instead of title --- erpnext/accounts/doctype/pricing_rule/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 238b37db356..f30d0bcaa62 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -37,11 +37,11 @@ def get_pricing_rules(args, doc=None): pricing_rules_all.extend(_get_pricing_rules(apply_on, args, values)) # removing duplicate pricing rule - pricing_rules_title = [] + pricing_rules_name = [] pricing_rules = [] for p in pricing_rules_all: - if p['title'] not in pricing_rules_title: - pricing_rules_title.append(p['title']) + if p['name'] not in pricing_rules_name: + pricing_rules_name.append(p['name']) pricing_rules.append(p) rules = []