From 79f6cde0824f42f7c40419b03721e96ad70f88ea Mon Sep 17 00:00:00 2001 From: sebalix Date: Fri, 22 Feb 2019 16:02:16 +0100 Subject: [PATCH] [FIX] account_payment_order: select payable and receivable lines When selecting move lines to create transactions, take into account payable and receivable lines (to include refunds) as it is done in v11. --- account_payment_order/wizard/account_payment_line_create.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_payment_order/wizard/account_payment_line_create.py b/account_payment_order/wizard/account_payment_line_create.py index 0737b022e..994288cd7 100644 --- a/account_payment_order/wizard/account_payment_line_create.py +++ b/account_payment_order/wizard/account_payment_line_create.py @@ -102,7 +102,7 @@ class AccountPaymentLineCreate(models.TransientModel): domain += [ ('credit', '>', 0), # '|', - ('account_id.internal_type', '=', 'payable'), + ('account_id.internal_type', 'in', ['payable', 'receivable']), # '&', # ('account_id.internal_type', '=', 'receivable'), # ('reconcile_partial_id', '=', False), # TODO uncomment @@ -110,7 +110,7 @@ class AccountPaymentLineCreate(models.TransientModel): elif self.order_id.payment_type == 'inbound': domain += [ ('debit', '>', 0), - ('account_id.internal_type', '=', 'receivable'), + ('account_id.internal_type', 'in', ['receivable', 'payable']), ] # Exclude lines that are already in a non-cancelled # and non-uploaded payment order; lines that are in a