From 6a9c401bef99abf457b3d68c2d4a7c4fc00cbc2d Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 8 Oct 2015 15:08:22 +0200 Subject: [PATCH] [FIX] account_banking_payment_export: Use residual amount in direct debits --- .../wizard/payment_order_create.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/account_banking_payment_export/wizard/payment_order_create.py b/account_banking_payment_export/wizard/payment_order_create.py index bd10c89ba..613f88eba 100644 --- a/account_banking_payment_export/wizard/payment_order_create.py +++ b/account_banking_payment_export/wizard/payment_order_create.py @@ -171,12 +171,7 @@ class PaymentOrderCreate(models.TransientModel): # customer invoice number (in the case of debit order) communication = line.invoice.number.replace('/', '') state = 'structured' - # support debit orders when enabled - if (payment.payment_order_type == 'debit' and - 'amount_to_receive' in line): - amount_currency = line.amount_to_receive - else: - amount_currency = line.amount_residual_currency + amount_currency = line.amount_residual_currency line2bank = line.line2bank(payment.mode.id) # -- end account banking res = {'move_line_id': line.id,