[FIX] analytic: name_search on accounts
The name_search was hardcoding ilike operator while it could be different. This means that a name_search "name != Agrolait" would return accounts with agrolait. A side effect of this was the impossibility to import account_analytic_account whose parent is a substring of another - opw 607315
This commit is contained in:
parent
f09e11f55b
commit
70b246c3c7
|
@ -301,7 +301,7 @@ class account_analytic_account(osv.osv):
|
||||||
dom = []
|
dom = []
|
||||||
for name2 in name.split('/'):
|
for name2 in name.split('/'):
|
||||||
name = name2.strip()
|
name = name2.strip()
|
||||||
account_ids = self.search(cr, uid, dom + [('name', 'ilike', name)] + args, limit=limit, context=context)
|
account_ids = self.search(cr, uid, dom + [('name', operator, name)] + args, limit=limit, context=context)
|
||||||
if not account_ids: break
|
if not account_ids: break
|
||||||
dom = [('parent_id','in',account_ids)]
|
dom = [('parent_id','in',account_ids)]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue