From cf875e4797a2ecdd59fd588475c1c911ec506fb8 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Fri, 15 Oct 2021 10:07:40 +0000 Subject: [PATCH] [FIX] point_of_sale: use correct rate date in test Since changes made in currency rate default value made in this PR https://github.com/odoo/odoo/pull/76513 the date is stored based on user timezone, and so doesn't work if the test runs around midnight with the belgian timezone on the servers. closes odoo/odoo#78480 X-original-commit: 0dc9a2d47833f2a13dce9891e7710815b4d27584 Signed-off-by: pimodoo --- addons/point_of_sale/tests/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/point_of_sale/tests/common.py b/addons/point_of_sale/tests/common.py index c5f69be2494..b52d789f555 100644 --- a/addons/point_of_sale/tests/common.py +++ b/addons/point_of_sale/tests/common.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from random import randint +from datetime import datetime from odoo import fields, tools from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon @@ -276,6 +277,7 @@ class TestPoSCommon(ValuationReconciliationTestCommon): cls.env['res.currency.rate'].create({ 'rate': 0.5, 'currency_id': cls.other_currency.id, + 'name': datetime.today().date(), }) other_cash_journal = cls.env['account.journal'].create({ 'name': 'Cash Other',