select flag from python model and tree view ignored in default search view

Bug #488128 reported by Stephane Wirtel (OpenERP)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Low
OpenERP's Framework R&D

Bug Description

Hi all,

To fix.

The filter widget in the new gtk client ( from trunk ) does not use the 'select' flags defined in the python code object.

In fact, it only uses the select flags from the definition of the arch of the view.

If any question, tell me.

Thank you

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Stephane,

If the object has the search view defined, then nothing can come into its way to appear into search panel.

If the object has no search view, then fields_view_get() will go for arch + python object both.

Can you give it another try?

May be, it just needs a parser change.

Thank you.

Changed in openobject-client:
milestone: none → 6.0
Changed in openobject-client:
status: New → Confirmed
Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Stephane,

you are absolutely correct, infact this issue is not from client rather its from the framework, if a model does not have a search view defined the framework will look out to build some kind of default search view based on the attribute 'select' from the form view of that model. So I would like to change the project to framework.

Thanks,

affects: openobject-client → openobject-server
Changed in openobject-server:
milestone: 6.0 → none
assignee: OpenERP sa GTK client R&D (openerp-dev-gtk) → OpenERP's Framework R&D (openerp-dev-framework)
Changed in openobject-server:
importance: Undecided → Low
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

BTW, the select attributes from list view are ignored too at the moment. To be fully 5.0-compatible we must change it to select = model.select OR form_view.select OR list_view.select

summary: - the select flag from the python object is not used in the filter widget
+ select flag from python model and tree view ignored in default search
+ view
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

it's normal because there is a search view. (and all objects must have search views in the future)
putting select="1" on the object indicates that the orm have to create an index, not that the field have to be added in the search view.

Changed in openobject-server:
status: Confirmed → Invalid
Changed in openobject-server:
status: Invalid → Confirmed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Fabien, the reason I confirmed this one is not about objects with existing search views, but about those that don't have any, and for which we create a search view on-the-fly.
The code that creates a default search view at the moment makes no sense: it uses the 'select' attribute from the form view, one that is almost never set!
So we might as well do it in a manner that makes sense and is backwards-compatible (also think of rapid prototyping, when there is no search view yet)

Changed in openobject-server:
milestone: none → 6.0-rc2
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Fixed in revision 3091 <email address hidden>, thanks for reporting ;-)

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.