Browse Source

Merge pull request #384 from Tecnativa/9.0-FIX-partner_financial_risk

[9.0][FIX] partner_financial_risk: Refund were not contemplated
pull/295/head
Pedro M. Baeza 8 years ago
committed by GitHub
parent
commit
21aa9ab2e0
  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()
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'))

Loading…
Cancel
Save