Regression: Many2One fields dont yield results if target object uses _rec_name

Bug #523762 reported by Sharoon Thomas http://openlabs.co.in
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
High
Unassigned

Bug Description

When a field is many2one and the target model of many2one uses _rec_name to point to a field which is other than 'name', then the searches don't work

So the search return empty and all records from the remote list view are removed.

Recreate by this:

Create a model with a field other than name and use _rec_name
Create a second model and add a many2one field to the first model and add the field to search list by select="n"

Search from the second model and you will not be able to search.

Related branches

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Stable or Trunk ?

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

5.0 Trunk

Changed in openobject-server:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thank you for the research Sharoon.
It has been fixed by revision 1982 <email address hidden>.
The problem I found was searching an unmatched string resulting all null matched ids.

I meant, If I go to advanced search for partners,search dedicated salesmane by ''de","dem","demo", it would work.
But, If I search by "demolish",it will treat the search as return all Partners which have null values at dedicated salesman as there are null records where name=demolish on res_users.

Would you please check and let us know?

Thanks.

Changed in openobject-server:
status: Confirmed → Fix Released
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.