From fb353f5dd3bbf5d492d00baffd3522f2f5899dac Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Tue, 4 May 2021 15:17:19 -0700 Subject: [PATCH] [FIX] account_payment_disperse: due amount includes lines without `date_maturity` --- account_payment_disperse/wizard/register_payment_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_payment_disperse/wizard/register_payment_wizard.py b/account_payment_disperse/wizard/register_payment_wizard.py index e2055a7c..6622d1fa 100644 --- a/account_payment_disperse/wizard/register_payment_wizard.py +++ b/account_payment_disperse/wizard/register_payment_wizard.py @@ -164,7 +164,7 @@ class AccountRegisterPaymentsInvoiceLine(models.TransientModel): for move_line in invoice.line_ids.filtered(lambda r: ( not r.reconciled and r.account_id.internal_type in ('payable', 'receivable') - and r.date_maturity <= cutoff_date + and (not r.date_maturity or r.date_maturity <= cutoff_date) )): amount = move_line.debit - move_line.credit total_amount += amount