[FIX] account: total_invoiced field should be only for customer

"total_invoiced" must only take customer invoices into account because
when you click on the button "invoiced" in the partner view form
you just see the customer invoices.

Adaptation for 8.0 of 9.0 fix made at 37569695

Closes #12044
This commit is contained in:
Pedro M. Baeza 2016-05-14 18:15:40 +02:00 committed by Martin Trigaux
parent aa1c3946da
commit 7e162e8993
No known key found for this signature in database
GPG Key ID: 7B0E288E7C0F83A7
1 changed files with 1 additions and 0 deletions

View File

@ -276,6 +276,7 @@ class res_partner(osv.osv):
AND cr.currency_id = %%s
AND (COALESCE(account_invoice_report.date, NOW()) >= cr.date_start)
AND (COALESCE(account_invoice_report.date, NOW()) < cr.date_end OR cr.date_end IS NULL)
AND account_invoice_report.type in ('out_invoice', 'out_refund')
""" % where_clause
# price_total is in the currency with rate = 1