Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Add grouping by category in employer view

By
peterm
on 9/26/13, 9:09 AM 1,968 views

How can I add grouping by category for employers in the standard employers view ?

Update

Right now I change the Search view adding this:

<filter string="Category" icon="terp-personal+" domain="[]" context="{'group_by':'category_ids'}"/>

And on clicking the button in the view I get this error:

File "/opt/openerp/openerp-server-6.0.4/bin/osv/orm.py", line 2170, in read_group
    assert not groupby or groupby in fields, "Fields in 'groupby' must appear in the list of fields to read (perhaps it's missing in the list view?)"
AssertionError: Fields in 'groupby' must appear in the list of fields to read (perhaps it's missing in the list view?)
0

AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
2050
| 4 5 8
Bronx, United States
--AJ Schrafel Paper Corp--

Exploring OpenERP for business

AJ Schrafel Paper Corp
On 9/26/13, 12:54 PM

category_ids must be displayed in the view for you to add it as a filter. That is what the error says.

You must edit the view to add category_ids you can add the invisible tag if you don't want users to see it.

No it won't even this way. I think it is not possible by design to group by a many2many field in a view.

peterm
on 9/26/13, 1:00 PM

Like this Q stated: http://help.openerp.com/question/22335/group-by-a-many2many-field/

peterm
on 9/26/13, 1:01 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/26/13, 9:09 AM
Seen: 1968 times
Last updated: 3/16/15, 8:10 AM