[FIX] account_payment_order_return: Fix tests

Don't post the invoice if it is already posted.
See 80c28189ae
This commit is contained in:
João Marques
2021-04-14 13:34:19 +01:00
committed by almumu
parent 7d868e066f
commit e3051ca39a

View File

@@ -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"])