Skip to content

Commit

Permalink
[IMP] product_pricelist_supplierinfo: test for non-supplier-info pric…
Browse files Browse the repository at this point in the history
…elist

Add a test for the scenario where the pricelist is not based on the
supplier info, ensuring the price is calculated as expected natively.
  • Loading branch information
CLaurelB committed Jan 8, 2025
1 parent fd4a01c commit abbc972
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions product_pricelist_supplierinfo/tests/test_product_supplierinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,15 @@ def test_pricelist_exclude_supplier_info_discount(self):
self.pricelist._get_product_price(self.product, 1),
10,
)

def test_pricelist_price_not_based_on_supplierinfo(self):
"""Test the scenario where the pricelist is not based on the supplier info,
so the price should be calculated as expected natively.
"""
self.pricelist.item_ids[0].base = "list_price"
product_template = self.product.product_tmpl_id
expected_price = product_template._price_compute("list_price")
self.assertAlmostEqual(
self.pricelist._get_product_price(self.product, 1),
expected_price[product_template.id],
)

0 comments on commit abbc972

Please sign in to comment.