Skip to content

Commit

Permalink
fix: broken apply on other item pricing rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Sep 12, 2024
1 parent 5c7dff0 commit 8b57c67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/accounts/doctype/pricing_rule/pricing_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,10 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False):
if isinstance(pricing_rule, str):
pricing_rule = frappe.get_cached_doc("Pricing Rule", pricing_rule)
update_pricing_rule_uom(pricing_rule, args)
pricing_rule.apply_rule_on_other_items = get_pricing_rule_items(pricing_rule) or []
fetch_other_item = True if pricing_rule.apply_rule_on_other else False
pricing_rule.apply_rule_on_other_items = (
get_pricing_rule_items(pricing_rule, other_items=fetch_other_item) or []
)

if pricing_rule.get("suggestion"):
continue
Expand Down

0 comments on commit 8b57c67

Please sign in to comment.