[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:
Anael Closson 2014-08-05 17:01:23 +02:00 committed by Martin Trigaux
parent f09e11f55b
commit 70b246c3c7
1 changed files with 1 additions and 1 deletions

View File

@ -301,7 +301,7 @@ class account_analytic_account(osv.osv):
dom = []
for name2 in name.split('/'):
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
dom = [('parent_id','in',account_ids)]
else: