From 42fa2e22577131f4e3f80b5c597bb7cfc6e01d1b Mon Sep 17 00:00:00 2001 From: "Gauthier Wala (gawa)" Date: Mon, 18 Mar 2024 09:44:38 +0100 Subject: [PATCH] [FIX] account: test_transfer_default_tax change of day error If the move in the test is created at 23:59:59, and the wizard on the next day at 00:00:01, the test will fail because the wizard takes today as the date at creation. We just add a freeze_time (for this test only, as the other tests in the class don't have the issue). Linked to runbot error 60478 closes odoo/odoo#159377 X-original-commit: d064068ff46ef8f84224f50c4c86922ae2004159 Signed-off-by: Cedric Snauwaert Signed-off-by: Wala Gauthier (gawa) --- addons/account/tests/test_transfer_wizard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account/tests/test_transfer_wizard.py b/addons/account/tests/test_transfer_wizard.py index 51915ac26ef..d2d0c829cb8 100644 --- a/addons/account/tests/test_transfer_wizard.py +++ b/addons/account/tests/test_transfer_wizard.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +from freezegun import freeze_time + from odoo import fields, Command from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged, Form @@ -190,6 +192,7 @@ class TestTransferWizard(AccountTestInvoicingCommon): }) cls.move_2.action_post() + @freeze_time('2024-03-13') def test_transfer_default_tax(self): """ Make sure default taxes on accounts are not computed on transfer moves """