Odoo Help


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.


[7.0] Group by functional field (stored in db)

Emanuel Cino
on 1/20/15, 9:58 AM 507 views

I have a model where a functional field of type many2one, partner_id,  is pointing to res.partner object.

This field is stored in database so that I can group by in the view. The group by function works well, however the partner name is not displayed on top of the group. Instead of having for instance "John Doe (10)" in my group view, I see "(10)". If I expand the group I can see that the partner_id field is set and contains John Doe in every record.

It seems that the label is not correctly reported in the group view. I tested with different objects and relations and I always have this problem. Do you know if it is a bug or if I have to configure something to tell what to display in the groupped line ?

Here is my code :

<filter string="Partner" domain="[]"  context="{'group_by':'partner_id'}"/>

_columns = {
        'partner_id': fields.function(
            _get_partner_id, type='many2one', obj='res.partner',
            string=_('Partner'), store=True),



| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 1/20/15, 10:37 AM

you  need to define _fnct_search on your functional field... 
refer to documentation here


No, it doesn't help. Since the field is stored in database, fnct_search is useless. I tried to add it but it is never called.

Emanuel Cino
on 1/21/15, 5:29 AM

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

1 follower(s)


Asked: 1/20/15, 9:58 AM
Seen: 507 times
Last updated: 3/16/15, 8:10 AM