[FIX] purchase_mrp: avoid inconsistent test exchange rate
Test was breaking during the nightly builds. Most likely due to the same issue as the one that odoo/odoo#131389 fixes, so we apply the same fix. closes odoo/odoo#144031 X-original-commit: 900373b2658240570f97998a7d86a6f4c3fb67fc Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com> Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.fields import Date
|
||||
from odoo.fields import Date, Datetime
|
||||
from odoo.tools import mute_logger
|
||||
from odoo.tests import Form, tagged
|
||||
from odoo.tests.common import TransactionCase
|
||||
@@ -201,8 +201,14 @@ class TestAngloSaxonValuationPurchaseMRP(TransactionCase):
|
||||
# Setup Currency
|
||||
usd = self.env.ref('base.USD')
|
||||
eur = self.env.ref('base.EUR')
|
||||
self.env['res.currency.rate'].create({'currency_id': usd.id, 'rate': 1})
|
||||
self.env['res.currency.rate'].create({'currency_id': eur.id, 'rate': 2})
|
||||
self.env['res.currency.rate'].create({
|
||||
'name': Datetime.today(),
|
||||
'currency_id': usd.id,
|
||||
'rate': 1})
|
||||
self.env['res.currency.rate'].create({
|
||||
'name': Datetime.today(),
|
||||
'currency_id': eur.id,
|
||||
'rate': 2})
|
||||
|
||||
# Create Purchase
|
||||
po_form = Form(self.env['purchase.order'])
|
||||
|
||||
Reference in New Issue
Block a user