[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) <wbr@odoo.com>
This commit is contained in:
Nasreddin Boulif (bon)
2022-07-02 21:07:47 +02:00
parent d8db282e97
commit 8bd265aca3
@@ -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)]})