Skip to content
Snippets Groups Projects
Commit 3e702430 authored by Cédric Krier's avatar Cédric Krier
Browse files

ACCOUNT: improve child search

bzr revid: ced-a31a8dde4a6b8ad4771e5fb082ee63291f806099
parent 35ce3230
Branches
Tags
No related merge requests found
......@@ -177,7 +177,7 @@ class account_analytic_account(osv.osv):
if not parent_id:
return {}
parent = self.read(cr, uid, [parent_id], ['partner_id','code'])[0]
childs = self.search(cr, uid, [('parent_id', '=', parent_id), ('active', '=', 1)]) + self.search(cr, uid, [('parent_id', '=', parent_id), ('active', '=', 0)])
childs = self.search(cr, uid, [('parent_id', '=', parent_id), ('active', 'in', [True, False])])
numchild = len(childs)
if parent['partner_id']:
partner = parent['partner_id'][0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment