From 8bd265aca35a0e91247ae7cdc2d5a1aa58a474b4 Mon Sep 17 00:00:00 2001 From: "Nasreddin Boulif (bon)" Date: Thu, 30 Jun 2022 14:01:48 +0000 Subject: [PATCH] [FIX] website_sale: fix website_sale `test_customize` tests Cause: The tests fails because the expected price is not the right one. It is because that when installing the l10n module, it changed the current company currency (if no localisation set) but not the pricelist. Solution: For the tests, change pricelist currency of the main website with company currency. opw-2899730 closes odoo/odoo#95080 X-original-commit: ddc802dc3be5e02166ffefe917ebaa3cfdd02e8d Signed-off-by: William Braeckman (wbr) --- addons/website_sale/tests/test_customize.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/website_sale/tests/test_customize.py b/addons/website_sale/tests/test_customize.py index 8175e2774f7..3bf8cd5ae13 100644 --- a/addons/website_sale/tests/test_customize.py +++ b/addons/website_sale/tests/test_customize.py @@ -54,6 +54,11 @@ class TestUi(HttpCaseWithUserDemo, HttpCaseWithUserPortal): else: ptav.price_extra = 50.4 + # Update the pricelist currency regarding env.company_id currency_id in case company has changed currency with COA installation. + website = self.env['website'].get_current_website() + pricelist = website.get_current_pricelist() + pricelist.write({'currency_id': self.env.company.currency_id.id}) + def test_01_admin_shop_customize_tour(self): # Enable Variant Group self.env.ref('product.group_product_variant').write({'users': [(4, self.env.ref('base.user_admin').id)]})