From bef08e46c644fc412ebfbeccfe1257487317daa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Wed, 14 Apr 2021 13:34:19 +0100 Subject: [PATCH] [FIX] account_payment_order_return: Fix tests Don't post the invoice if it is already posted. See https://github.com/odoo/odoo/commit/80c28189ae6b10ad17c4de2a781233a8ffe663a6 --- .../tests/test_account_payment_order_return.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 abc9c88ec..14910ccb9 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 @@ -90,7 +90,8 @@ class TestAccountPaymentOrderReturn(common.SavepointCase): ) ) self.payment = payment_register.save()._create_payments() - self.payment.action_post() + if self.payment.state != "posted": + self.payment.action_post() wizard.populate() # Create payment return payment_return_form = Form(self.env["payment.return"])