Comment 2 for bug 1096838

Revision history for this message
Hiral Patel (OpenERP) (hip-openerp) wrote :

Hello,

There is already a name_search override one res.country object with name location_name_search, you can see the line#71 of res_country.py (name_search = location_name_search).

On this name search we have to first search based on the county code then after county name. i.e United Kingdom 's county code is GB so If you try to search with GB then you can see the United Kingdom. Which is fine but you have to mislead because we have put the condition with domain under the name search.

see the line#30 if len(name) == 2: and put the domain [('code', 'ilike', name)], So whenever you have try to search with 2 char then it always search with the county code not with the county name.

Now please try with this type 'Uni' or "Unit", you can see the result "United Arab Emirates", "United Kingdom", "United States".
For that is has search for county name now which is also seems perfect.

So there is no meaning of bug here that 'why I am closing this issue.

Thanks for the understanding and efforts!