From 0ac4d50538b3a1c5e01c42d3807f336160b8754b Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 18 Feb 2016 10:24:19 +0100 Subject: [PATCH] [FIX] account_banking_payment_export: Fix move lines domain in create payment order --- .../wizard/payment_order_create.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/account_banking_payment_export/wizard/payment_order_create.py b/account_banking_payment_export/wizard/payment_order_create.py index 7613d377e..0ef18563e 100644 --- a/account_banking_payment_export/wizard/payment_order_create.py +++ b/account_banking_payment_export/wizard/payment_order_create.py @@ -75,11 +75,14 @@ class PaymentOrderCreate(models.TransientModel): # Do not propose partially reconciled credit lines, # as they are deducted from a customer invoice, and # will not be refunded with a payment. - domain += ['|', - ('account_id.type', '=', 'payable'), - '&', - ('account_id.type', '=', 'receivable'), - ('reconcile_partial_id', '=', False)] + domain += [ + ('credit', '>', 0), + '|', + ('account_id.type', '=', 'payable'), + '&', + ('account_id.type', '=', 'receivable'), + ('reconcile_partial_id', '=', False), + ] @api.multi def filter_lines(self, lines):