From f201e720c4960d561e21462f8ffd7bf651957380 Mon Sep 17 00:00:00 2001 From: jem-odoo Date: Wed, 22 Aug 2018 10:23:18 +0200 Subject: [PATCH] [FIX] sale_timesheet: remove confusing currency rates The test of reporting is executed in the same currency then the company (USD as default). But in the demo data there is a bad currency rate converting USD into USD with a rate of 1.5289. This commit removes the confusing currency rate in order to make the test running in a more stable environment. --- addons/sale_timesheet/tests/test_reporting.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/sale_timesheet/tests/test_reporting.py b/addons/sale_timesheet/tests/test_reporting.py index 0694125b20a..ae784456e1a 100644 --- a/addons/sale_timesheet/tests/test_reporting.py +++ b/addons/sale_timesheet/tests/test_reporting.py @@ -15,7 +15,10 @@ class TestReporting(TestCommonSaleTimesheetNoChart): cls.setUpAdditionalAccounts() cls.setUpAccountJournal() - cls.env.ref('product.list0').currency_id = cls.env.user.company_id.currency_id + # tweak demo data: force currency and remove confusing rates + company_currency = cls.env.user.company_id.currency_id + cls.env.ref('product.list0').currency_id = company_currency + cls.env['res.currency.rate'].search([('currency_id', '=', company_currency.id), ('company_id', '=', cls.env.user.company_id.id)]).unlink() # there a rate to convert USD into USD in demo data # expense product cls.product_expense = cls.env['product.product'].with_context(mail_notrack=True, mail_create_nolog=True).create({