From 2bc3bc9e265cc3ba48c538ddb391e7e2c5864eb0 Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Tue, 20 Jan 2015 20:18:16 +0100 Subject: [PATCH] [FIX] Bad condition --- account_cash_discount_payment/wizard/account_payment_create.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/account_cash_discount_payment/wizard/account_payment_create.py b/account_cash_discount_payment/wizard/account_payment_create.py index 7d9d9db9119..fb87b7a336b 100644 --- a/account_cash_discount_payment/wizard/account_payment_create.py +++ b/account_cash_discount_payment/wizard/account_payment_create.py @@ -42,8 +42,7 @@ def _prepare_payment_line(self, payment, line): today = datetime.now().strftime(DEFAULT_SERVER_DATE_FORMAT) if move_line.invoice and move_line.invoice.discount_due_date: invoice = move_line.invoice - if invoice.discount_due_date >= today and \ - invoice.amount_total == line.amount_residual: + if invoice.discount_due_date >= today: discount = invoice.amount_total - \ invoice.discount_amount res.update({'amount_currency': invoice.discount_amount,