Fix search on country code
bzr revid: ced-d7ae01f6d391b5bf8899b177830894169b672621
This commit is contained in:
parent
73e09cbc81
commit
5950f8e787
|
@ -53,8 +53,8 @@ class Country(osv.osv):
|
|||
if not context:
|
||||
context={}
|
||||
ids = False
|
||||
if len(name) <= 2:
|
||||
ids = self.search(cr, user, [('code', '=', name)] + args,
|
||||
if len(name) == 2:
|
||||
ids = self.search(cr, user, [('code', '=', name.upper())] + args,
|
||||
limit=limit, context=context)
|
||||
if not ids:
|
||||
ids = self.search(cr, user, [('name', operator, name)] + args,
|
||||
|
|
Loading…
Reference in New Issue