[Leads] In leads form view, typing "UK" should show "United Kingdom" as possible result, just like US

Bug #1096838 reported by Gilles Major (OpenERP)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Low
OpenERP's Framework R&D

Bug Description

1. Go to Sales => Leads.
2. In the Country field, type UK => shows "ukraine"

If you type "US", you see "United States". This should be the same here.

This should probably go to wishlist, by I can't edit it myself.

description: updated
Revision history for this message
Anand (anand-m-patel) wrote :

Hello Gilles Major,

I have checked this issue and face the same problem.

The search should work like name_search in product where it searches for both product code and name.

So, here it should search country code and country name.

Thanks,

Changed in openerp-web:
status: New → Confirmed
affects: openerp-web → openobject-server
Changed in openobject-server:
importance: Undecided → Low
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
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!

Changed in openobject-server:
status: Confirmed → Invalid
Revision history for this message
Gilles Major (OpenERP) (gim-openerp) wrote :

this isn't a bug after all as Hiral mentionned, since the results are based on the iso code.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.