[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.
This commit is contained in:
jem-odoo
2018-08-22 11:52:52 +02:00
parent 14b9e9c92d
commit f201e720c4
@@ -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({