[FIX] account: correct contract_count value.

Use `child_of` operator to match the search that will be done by the
search view.
This commit is contained in:
Christophe Simonis
2015-03-27 15:49:58 +01:00
parent d555fdac0c
commit 2f29acf9c5
+1 -1
View File
@@ -254,7 +254,7 @@ class res_partner(osv.osv):
return {
partner_id: {
'journal_item_count': MoveLine.search_count(cr, uid, [('partner_id', '=', partner_id)], context=context),
'contracts_count': AnalyticAccount.search_count(cr,uid, [('partner_id', '=', partner_id)], context=context)
'contracts_count': AnalyticAccount.search_count(cr, uid, [('partner_id', 'child_of', partner_id)], context=context)
}
for partner_id in ids
}