Skip to content
Snippets Groups Projects
Commit fea0fef7 authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] project_issue: number of issues for a customer

When counting the number of issues for a customer, all the the contacts
of this customer must be taken into account.

opw:676985
parent 4c07fafe
Branches
Tags
No related merge requests found
......@@ -546,9 +546,10 @@ class project_project(osv.Model):
class res_partner(osv.osv):
def _issue_count(self, cr, uid, ids, field_name, arg, context=None):
Issue = self.pool['project.issue']
partners = {id: self.search(cr, uid, [('id', 'child_of', ids)]) for id in ids}
return {
partner_id: Issue.search_count(cr,uid, [('partner_id', '=', partner_id)])
for partner_id in ids
partner_id: Issue.search_count(cr, uid, [('partner_id', 'in', partners[partner_id])])
for partner_id in partners.keys()
}
""" Inherits partner and adds Issue information in the partner form """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment