From ee89a30f1f8f20562f54094d5b7b578451788cd7 Mon Sep 17 00:00:00 2001 From: Carlos Dauden Date: Fri, 3 Feb 2017 15:32:49 +0100 Subject: [PATCH] [9.0][FIX] partner_financial_risk: Refund were not contemplated --- partner_financial_risk/models/res_partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partner_financial_risk/models/res_partner.py b/partner_financial_risk/models/res_partner.py index 42f43b1a4..6fd92e5a2 100644 --- a/partner_financial_risk/models/res_partner.py +++ b/partner_financial_risk/models/res_partner.py @@ -73,7 +73,7 @@ class ResPartner(models.Model): max_date = self._max_risk_date_due() for partner in self: invoices_out = partner.invoice_ids.filtered( - lambda x: x.type == 'out_invoice') + lambda x: x.type in ['out_invoice', 'out_refund']) invoices = invoices_out.filtered( lambda x: x.state in ['draft', 'proforma', 'proforma2']) partner.risk_invoice_draft = sum(invoices.mapped('amount_total'))