From b11621476bcee658e912cbfbd9569b7d29ca6b53 Mon Sep 17 00:00:00 2001 From: mreficent Date: Tue, 3 Apr 2018 16:00:39 +0200 Subject: [PATCH] [FIX] pos & website_event_sale: fix some tests Related to commit https://github.com/odoo/odoo/commit/0e881fcd3a5671c4fe84b2a47c9d3611e4b823a1 --- addons/point_of_sale/tests/test_frontend.py | 2 +- addons/website_event_sale/tests/test_ui.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/tests/test_frontend.py b/addons/point_of_sale/tests/test_frontend.py index 88fbc551bb7..81f3b5d4da8 100644 --- a/addons/point_of_sale/tests/test_frontend.py +++ b/addons/point_of_sale/tests/test_frontend.py @@ -33,7 +33,7 @@ class TestUi(odoo.tests.HttpCase): # euro's. this will cause issues as the sale journal is in # USD, because of this all products would have a different # price - main_company.currency_id = env.ref('base.USD') + cr.execute("UPDATE res_company SET currency_id = %s WHERE id = %s", [env.ref('base.USD').id, main_company.id]) test_sale_journal = journal_obj.create({'name': 'Sale Journal - Test', 'code': 'TSJ', diff --git a/addons/website_event_sale/tests/test_ui.py b/addons/website_event_sale/tests/test_ui.py index c2e6f04f4a6..968ab6edcd9 100644 --- a/addons/website_event_sale/tests/test_ui.py +++ b/addons/website_event_sale/tests/test_ui.py @@ -12,7 +12,7 @@ class TestUi(odoo.tests.HttpCase): # - that main demo company is gelocated in US # - that this test awaits for hardcoded USDs amount # we have to force company currency as USDs only for this test - self.env.ref('base.main_company').write({'currency_id': self.env.ref('base.USD').id}) + self.cr.execute("UPDATE res_company SET currency_id = %s WHERE id = %s", [self.env.ref('base.USD').id, self.env.ref('base.main_company').id]) self.phantom_js("/", "odoo.__DEBUG__.services['web_tour.tour'].run('event_buy_tickets')", "odoo.__DEBUG__.services['web_tour.tour'].tours.event_buy_tickets.ready", login="admin") def test_demo(self):