From 70b246c3c7d6c7b197f1d36cf6c86aeed896d077 Mon Sep 17 00:00:00 2001 From: Anael Closson Date: Tue, 5 Aug 2014 17:01:23 +0200 Subject: [PATCH] [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 --- addons/analytic/analytic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 5a77b86f14f..5c91caad3a5 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -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: