diff --git a/account_payment_order/__manifest__.py b/account_payment_order/__manifest__.py index b6db51973..2be57eeb0 100644 --- a/account_payment_order/__manifest__.py +++ b/account_payment_order/__manifest__.py @@ -9,7 +9,7 @@ { "name": "Account Payment Order", - "version": "15.0.1.0.1", + "version": "15.0.1.0.2", "license": "AGPL-3", "author": "ACSONE SA/NV, " "Therp BV, " diff --git a/account_payment_order/tests/test_payment_order_outbound.py b/account_payment_order/tests/test_payment_order_outbound.py index 7ab83c26d..8a087265a 100644 --- a/account_payment_order/tests/test_payment_order_outbound.py +++ b/account_payment_order/tests/test_payment_order_outbound.py @@ -140,7 +140,9 @@ class TestPaymentOrderOutbound(AccountTestInvoicingCommon): line_create = ( self.env["account.payment.line.create"] .with_context(active_model="account.payment.order", active_id=order.id) - .create({"date_type": "move", "move_date": datetime.now()}) + .create( + {"date_type": "move", "move_date": datetime.now() + timedelta(days=1)} + ) ) line_create.payment_mode = "any" line_create.move_line_filters_change() @@ -149,7 +151,9 @@ class TestPaymentOrderOutbound(AccountTestInvoicingCommon): line_created_due = ( self.env["account.payment.line.create"] .with_context(active_model="account.payment.order", active_id=order.id) - .create({"date_type": "due", "due_date": datetime.now()}) + .create( + {"date_type": "due", "due_date": datetime.now() + timedelta(days=1)} + ) ) line_created_due.populate() line_created_due.create_payment_lines() @@ -208,7 +212,7 @@ class TestPaymentOrderOutbound(AccountTestInvoicingCommon): } ) with self.assertRaises(ValidationError): - outbound_order.date_scheduled = date.today() - timedelta(days=1) + outbound_order.date_scheduled = date.today() - timedelta(days=2) def test_manual_line_and_manual_date(self): @@ -262,8 +266,14 @@ def test_manual_line_and_manual_date(self): outbound_order.payment_line_ids[0].date, outbound_order.payment_line_ids[0].bank_line_id.date, ) - self.assertEqual(outbound_order.payment_line_ids[1].date, date.today()) - self.assertEqual(outbound_order.payment_line_ids[1].bank_line_id.date, date.today()) + self.assertEqual( + outbound_order.payment_line_ids[1].date, + fields.Date.context_today(outbound_order), + ) + self.assertEqual( + outbound_order.payment_line_ids[1].bank_line_id.date, + fields.Date.context_today(outbound_order), + ) # Generate and upload outbound_order.open2generated() outbound_order.generated2uploaded()