Skip to content
Snippets Groups Projects
Commit b11c49d6 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] sale: sales team amount invoiced exclude purchases

This is possible to assign a sales team to a supplier invoices
Supplier invoices must be rejected in the invoiced count
of sales team (in the kanban view of sales team).

The invoiced amount must be the customer invoices amount minus
the customer refund invoices amount

opw-629105
parent 4bd2ee1a
Branches
Tags
No related merge requests found
......@@ -36,7 +36,7 @@ class crm_case_section(osv.osv):
res = {}
for id in ids:
created_domain = [('section_id', '=', id), ('state', 'not in', ['draft', 'cancel']), ('date', '>=', date_begin), ('date', '<=', date_end)]
created_domain = [('type', 'in', ['out_invoice', 'out_refund']), ('section_id', '=', id), ('state', 'not in', ['draft', 'cancel']), ('date', '>=', date_begin), ('date', '<=', date_end)]
values = self.__get_bar_values(cr, uid, obj, created_domain, ['price_total', 'date'], 'price_total', 'date', context=context)
for value in values:
value['value'] = float_repr(value.get('value', 0), precision_digits=self.pool['decimal.precision'].precision_get(cr, uid, 'Account'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment