From 0ccf4bd07bc2b07b567ee99b2d02f0a14af7e475 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 23 Apr 2022 00:11:09 +0200 Subject: [PATCH] [FIX] account_payment_order_return: Don't fail due to tz When the test hour is around midnight, and demo data using CET/CEST timezones, current code fails due to some asserts not having this into consideration. This fix avoids such problem, and irons the execution no matter the hour. --- account_payment_order_return/__manifest__.py | 2 +- .../tests/test_account_payment_order_return.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/account_payment_order_return/__manifest__.py b/account_payment_order_return/__manifest__.py index ad90e5c64..055fd17d0 100644 --- a/account_payment_order_return/__manifest__.py +++ b/account_payment_order_return/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Payment Order Return", - "version": "14.0.1.0.1", + "version": "14.0.1.0.2", "category": "Banking addons", "author": "Tecnativa, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/bank-payment", diff --git a/account_payment_order_return/tests/test_account_payment_order_return.py b/account_payment_order_return/tests/test_account_payment_order_return.py index 14910ccb9..58a32d509 100644 --- a/account_payment_order_return/tests/test_account_payment_order_return.py +++ b/account_payment_order_return/tests/test_account_payment_order_return.py @@ -3,6 +3,8 @@ # Copyright 2021 Tecnativa - Víctor Martínez # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0 +from datetime import timedelta + from odoo import fields from odoo.tests import common from odoo.tests.common import Form @@ -76,7 +78,7 @@ class TestAccountPaymentOrderReturn(common.SavepointCase): "partner_ids": [(4, self.partner.id)], "allow_blocked": True, "date_type": "move", - "move_date": fields.Date.today(), + "move_date": fields.Date.today() + timedelta(days=1), "payment_mode": "any", "invoice": True, "include_returned": True,