From 7095cb5af5ddef5e89e2bc1da8add6bfff1ed10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Tue, 6 Jun 2017 13:32:02 +0200 Subject: [PATCH] [FIX] sale_timesheet: avoid currency rate based on demo data On the 6 June, the rate from EUR to USD change in demo data. This cause problem in test, when comparing amount. We choose to not used currency rate defined in demo data and that are time-dependent. --- addons/sale_timesheet/tests/test_timesheet_revenue.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/sale_timesheet/tests/test_timesheet_revenue.py b/addons/sale_timesheet/tests/test_timesheet_revenue.py index 7d62f088a94..f96dc67720a 100644 --- a/addons/sale_timesheet/tests/test_timesheet_revenue.py +++ b/addons/sale_timesheet/tests/test_timesheet_revenue.py @@ -8,6 +8,13 @@ class TestSaleTimesheet(TestSale): def setUp(self): super(TestSaleTimesheet, self).setUp() + + # NOTE JEM + # The tests below are based on the `base.rateUSD` currency rate. It + # is required to remove the `base.rateUSDbis` to avoid rounding error + # after the 6 june of current year. + self.env.ref('base.rateUSDbis').unlink() + # create project self.project = self.env['project.project'].create({ 'name': 'Project for my timesheets',