Browse Source

[9.0][FIX] partner_financial_risk: Error when risk_total includes draft_invoices

pull/470/head
Carlos Dauden 8 years ago
committed by David
parent
commit
3f087949ae
  1. 4
      partner_financial_risk/models/account_invoice.py

4
partner_financial_risk/models/account_invoice.py

@ -22,7 +22,9 @@ class AccountInvoice(models.Model):
partner.risk_invoice_open_limit):
exception_msg = _(
"This invoice exceeds the open invoices risk.\n")
elif partner.risk_invoice_open_include and (
# If risk_invoice_draft_include this invoice included in risk_total
elif not partner.risk_invoice_draft_include and (
partner.risk_invoice_open_include and
(partner.risk_total + invoice.amount_total) >
partner.credit_limit):
exception_msg = _(

Loading…
Cancel
Save