Skip to content

Commit

Permalink
[FIX] product_pack: remove price compute pricelist by context test
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-zanotti committed Feb 1, 2024
1 parent ba0d600 commit 222d633
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions product_pack/tests/test_product_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,3 @@ def test_pack_modifiable(self):
pack.pack_type = "detailed"
pack.pack_component_price = "totalized"
self.assertTrue(pack.pack_modifiable_invisible)

def test_price_compute_with_pricelist_context(self):
# Ensure that the price_compute method correctly handles the
# price list context when the price list is missing.
product_pack = self.env.ref("product_pack.product_pack_cpu_detailed_totalized")
component_1 = self.env.ref("product_pack.pack_cpu_detailed_totalized_1")
component_1.product_id.list_price = 30.0
component_2 = self.env.ref("product_pack.pack_cpu_detailed_totalized_3")
component_2.product_id.list_price = 15.0
component_3 = self.env.ref("product_pack.pack_cpu_detailed_components_4")
component_3.product_id.list_price = 5.0
price = (
product_pack.with_context(pricelist="pricelist test")
.price_compute("list_price")
.get(product_pack.id)
)
self.assertEqual(price, 50.0)

0 comments on commit 222d633

Please sign in to comment.