Pricing rule alot of bugs


I would like to point out that pricing rule seems buggy and incomplete, after brief testing I manage to found 7 bugs related to pricing rule.

Details list at Google Sheet.

My environment are:
Setup: ERPNext Docker Debian on windows 10
ERPNext: v12.5.0 (version-12)
Frappe Framework: v12.3.0 (version-12)

Also here is my attempt to simplify pricing rule process.
(Nothing related to the bugs but I create it for my self to further understand how pricing rule works)


Thanks so much for this valuable contribution @pipech

Your workflow diagram and spreadsheet together are a big help to map and define all of the uses cases, functional gaps and actual versus expected result bugs.

These six pricing rule tests are an excellent basis to start that could be extended to the additional test case gaps you have identified.

frappe@ubuntu1804lts:~/frappe-bench$ find . -name ‘’ | xargs grep ‘def test’
def test_pricing_rule_for_discount(self):
def test_pricing_rule_for_margin(self):
def test_mixed_conditions_for_item_group(self):
def test_pricing_rule_for_variants(self):
def test_pricing_rule_for_stock_qty(self):
def test_pricing_rule_with_margin_and_discount(self):

1 Like