[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
This commit is contained in:
parent
4bd2ee1aaa
commit
b11c49d6f6
|
@ -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'))
|
||||
|
|
Loading…
Reference in New Issue