Browse Source

[9.0][FIX] partner_financial_risk: Refund were not contemplated

pull/384/head
Carlos Dauden 8 years ago
parent
commit
ee89a30f1f
  1. 2
      partner_financial_risk/models/res_partner.py

2
partner_financial_risk/models/res_partner.py

@ -73,7 +73,7 @@ class ResPartner(models.Model):
max_date = self._max_risk_date_due() max_date = self._max_risk_date_due()
for partner in self: for partner in self:
invoices_out = partner.invoice_ids.filtered( 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( invoices = invoices_out.filtered(
lambda x: x.state in ['draft', 'proforma', 'proforma2']) lambda x: x.state in ['draft', 'proforma', 'proforma2'])
partner.risk_invoice_draft = sum(invoices.mapped('amount_total')) partner.risk_invoice_draft = sum(invoices.mapped('amount_total'))

Loading…
Cancel
Save