From 5c18382533b07f3f6fb4ffbfab096187b4603b67 Mon Sep 17 00:00:00 2001 From: Javier Colmeiro Date: Wed, 19 Aug 2020 12:40:00 +0200 Subject: [PATCH] fix domain in payment_order_return fix domain in payment_order_return in order to avoid problems with moves without associated invoice as discused at #718 --- .../wizards/account_payment_line_create.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/account_payment_order_return/wizards/account_payment_line_create.py b/account_payment_order_return/wizards/account_payment_line_create.py index d443af40d..af489e1c8 100644 --- a/account_payment_order_return/wizards/account_payment_line_create.py +++ b/account_payment_order_return/wizards/account_payment_line_create.py @@ -15,5 +15,9 @@ class AccountPaymentLineCreate(models.TransientModel): domain = super(AccountPaymentLineCreate, self)._prepare_move_line_domain() if not self.include_returned: - domain.append(('invoice_id.returned_payment', '=', False)) + domain += [ + '|', + ('invoice_id', '=', False), + ('invoice_id.returned_payment', '=', False) + ] return domain