Skip to content

Commit 1426a10

Browse files
committed
[FIX][MIG] fixes errors
1 parent f92b778 commit 1426a10

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

subscription_oca/tests/test_subscription_oca.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,12 +659,15 @@ def test_x_subscription_oca_pricelist_related_2(self):
659659
self.pricelist_l3.currency_id = self.env.ref("base.THB")
660660
self.sub_line.sale_subscription_id.pricelist_id = self.pricelist_l3
661661
res = self.sub_line._get_display_price(self.product_1)
662+
conversion_rate = self.env.company.currency_id._get_conversion_rate(
663+
self.env.company.currency_id,
664+
self.pricelist_l3.currency_id,
665+
self.env.company,
666+
fields.Date.today(),
667+
)
662668
self.assertAlmostEqual(
663669
int(res),
664-
round(
665-
self.product_1.standard_price
666-
* self.pricelist_l3.currency_id.rate_ids[:1].company_rate
667-
),
670+
round(self.product_1.standard_price * conversion_rate),
668671
)
669672
self.sub_line.product_uom_qty = 300
670673
res = self.sub_line.read(["discount"])

0 commit comments

Comments
 (0)