[Search] Many2one combobox implies discrete search for particular resource, but does substring search instead

Bug #751197 reported by Stefan Rijnhart (Opener)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web Client
Won't Fix
Wishlist
OpenERP R&D Web Team

Bug Description

In the webclient, the search field for a many2one field provides a combobox with names of discrete resources, as well as a selection icon to select a discrete resource in a popup window. At the same time, the search field does allow the user not to select a discrete resource but leave his raw input as a search criterium. The latter implies a substring search, which is indeed the case. The former case, in which the user does select a single resource as a search criterium strongly implies a search on a uniqe resource. However, in this case the performed search is a substring search as well.

Example:

In my database, I search for partners in the Netherlands. Once I start to type something like 'Nethe', the combobox offers me the choice between Netherlands and Netherlands Antilles. If I select 'Netherlands' from the dropdown options or select this resource through the selection icon, I would expect the resulting partners all to reside in this country, but instead I get partners in the Netherlands Antilles as well, because Netherlands is a substring of Netherlands Antilles.

Checked against openobject-client-web/6.0 revision 4567

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

This bug has been marked as a duplicate of 748238 because of a misunderstanding. The misunderstanding is that the many2one search widget of the webclient applies the '=' operator. It does apply the 'like' operator instead.

Even more so,applying the '=' operator would still be a rather sloppy solution for the behaviour I observed and in order to solve this problem properly the webclient should search for the actual id instead of a string.

Revision history for this message
Jiten (OpenERP) (jiten-openerp) wrote :

Hello Stefan Rijnhart (Therp),

I have tested as your description with latest code of stable web client and with trunk code too but did not get any problem. Its working fine as expected with both of codes.

Please check the attachment video "m2o_search" for that.
There is three different country like "Africa", "Africa North" and "Africa South".
When I select only "Africa" than its give me only the records of that country not combine records from "Africa North" and "Africa South" because there should be different country.

So, I think there is not apply the 'like' operator as you said in comment #1. It does apply "=" operator with m2o search.

Please note that Web client offers many2one widget so the query formed will be comprising of '=',
Where as in GTK they offer char widget so the query formed should be "ilike".

So if we stick on your view then we either need to change the widget to char. which I feel does not seems feasible or GTK needs to change the widget to many2one. For now I am converting the bug to "Wishlist".

Changed in openobject-client-web:
importance: Undecided → Wishlist
Revision history for this message
Jiten (OpenERP) (jiten-openerp) wrote :
Revision history for this message
Jiten (OpenERP) (jiten-openerp) wrote :

I am converting the bug as "Wishlist" for affecting to web client only.

Changed in openobject-client-web:
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
status: New → Confirmed
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Jiten,

I confirm that the trunk version of the webclient does apply the '=' operator. This is a big step in the right direction. Apologies for not checking earlier and for the fact that I have not mentioned the 6.0 branch explicitely above. Again, there still is a strong case for searching by id instead of by character string and I am glad to have it as a wishlist item.

The 6.0 branch, revision 4577 still seems to apply the 'ilike' operator on our systems but I will double check some other time.

Cheers,
Stefan.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi,

to come back to this, I confirm the fix for this in 6.0: Many2one search widget now searches for a resource by ID.

http://bazaar.launchpad.net/~openerp/openobject-client-web/6.0/revision/4578

Very well done.

Thanks,
Stefan.

Revision history for this message
OpenERP Majordomo (openerp-majordomo) wrote : OpenERP Majordomo Message

**automated message**
Thanks a lot for reporting this bug and contributing to OpenERP. Unfortunately the OpenERP Web Client project is not going to be developed further after the 6.0 series. As of 6.1 a newer and better web frontend known as the OpenERP Web project[1] will be available.
Our R&D developers normally work in Launchpad to fix bugs for the next release, but there will be no next release for the current OpenERP Web Client. As our resources are limited, all further R&D efforts from the Web team are dedicated to finish the new 6.1 OpenERP Web project[1].
This bug will be closed as "Won't Fix" to show that R&D won't be able to work on it.

Bugs affecting customers in production of course continue to be handled via the OpenERP Enterprise (OPW) maintenance service, and this is the recommended way to have them corrected directly in the 6.0 LTS stable branch.
You can find more details about all of this in the FAQ of our Bug Management Policy documentation[2].

If you are interested, you should soon be able to beta-test the new OpenERP Web 6.1 (this will be announced on OpenERP Community channels).

Thank you for your contributions and for your understanding!

[1] https://launchpad.net/openerp-web
[2] http://bit.ly/openerp-bugs-faq (FAQ #4)

Changed in openobject-client-web:
status: Confirmed → Won't Fix
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.