fix: pricing rule with and without 'apply multiple' and priority

Either all of the pricing rules identified for an item should have
'apply multiple' enabled. If not, Priority is applied and only the
highest priority is applied

(cherry picked from commit 5e875b238c)
This commit is contained in:
ruthra kumar
2024-06-21 15:46:16 +05:30
committed by Mergify
parent a535933a09
commit f3aa885488

View File

@@ -174,12 +174,9 @@ def _get_pricing_rules(apply_on, args, values):
def apply_multiple_pricing_rules(pricing_rules):
apply_multiple_rule = [
d.apply_multiple_pricing_rules for d in pricing_rules if d.apply_multiple_pricing_rules
]
if not apply_multiple_rule:
return False
for d in pricing_rules:
if not d.apply_multiple_pricing_rules:
return False
return True