From 82facdc1609533c0be84be8db4fb95b9a1e00027 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Tue, 2 Feb 2016 10:20:23 +0100 Subject: [PATCH] Revert "[FIX] base: location_name_search search may return twice the limit value" This reverts commit a7bac68f45c80eb6a02af9128ecbec67806b74a8. --- openerp/addons/base/res/res_country.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py index c7c4adaa0ab..e59d00ed50a 100644 --- a/openerp/addons/base/res/res_country.py +++ b/openerp/addons/base/res/res_country.py @@ -19,7 +19,7 @@ def location_name_search(self, cr, user, name='', args=None, operator='ilike', if ids: search_domain.append(('id', 'not in', ids)) ids.extend(self.search(cr, user, search_domain + args, - limit=limit-len(ids), context=context)) + limit=limit, context=context)) locations = self.name_get(cr, user, ids, context) return sorted(locations, key=lambda (id, name): ids.index(id))