How to group a tree/list view inside a fom view in Odoo 8? How to group a tree/list view inside a fom view in Odoo 8? xml xml

How to group a tree/list view inside a fom view in Odoo 8?


The best thing you can do, using the Odoo framework, is to create a button. You can open a wizard showing the tree view with that button. Like this, you can use a search view in the wizard and you can group by the elements with a normal filter.

If you still want to group the elements directly in the form I'm afraid you should create a widget in JavaScript. The widget should be easier and better, this widget should override or extend the widget that Odoo is using for that kind of fields.

I didn't make a good research but it seems that was possible to group the list view in the forms of the 6.1 version. Maybe you can make a migration of that behaviour

Anyway I recommend you to adapt you needs to the Odoo framework as much as possible to make your life easier.

But, if you finally decide to create the widget and share it with the community, would be awesome :)


Something like this might work:

<field name="line_ids" context="{'group_by': 'material'}">    <tree> ...</tree><field>