Odoo Help


(Still the same, no change) I added a boolean field in my search view as group by. But when i grouped the boolean field, its search name shows as true. How can i change true to my field name?

on 12/31/14, 5:46 AM 2,353 views


I added a boolean field in my search view. When i grouped it, instead of the field name it shows true. I want remove the true showing in the filter view. I added string="field label" and name="field label" both are not working.

Then i listed and take search view, still shows wrongly.

Please suggest a method to search perfectly a boolean field.

How can i solve this?

For Eg:

'temporary_employees' : fields.boolean('Temporary Employees'),


<group string="Temporary Employees">
                        <filter string="Temporary Employees" icon="terp-gtk-select-all" domain="['&amp;',('temporary_employees',  '=', True)]" context="{'group_by':'temporary_employees'}"/>

When i take group by of the above field, search name shows as True/false instead of  Temporary Employees.

When we give filter string="Temporary Employees", group by name will shows the corresponding string name,right?But for boolean field it showing true/false in kanban view and in tree view showing checkbox. How can i get the dting in the group by?



Hello Rosery, what do you want to do exactly ? Are you willing to make a similar filter as the 'customer' 'supplier' in Partners search view ? If not, could you post some example of what you want to do ?Regards

on 1/7/15, 6:01 AM

Please check the updated question

on 1/8/15, 11:37 PM
Nishant Jogi
On 1/5/15, 8:47 AM

Hello Rosey,

You can resolve your problem with read_group, you use following example for reference.


def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False,lazy=True):
        ret_val = super(res_partner, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby,lazy=lazy)
        for rt in ret_val:
            if rt.has_key('customer'):
                if rt.get('customer', False):
                    rt['customer'] = 'Customer'
                    rt['customer'] = 'Not Customer'
        return ret_val

Here, customer is boolean field, when we group by boolean field it will display value means True or False but you can change the value of Display by using read_group method.


But it doesnt change the value. Still the same.

on 1/6/15, 6:04 AM

Where you want to change? This will replace true with 'Customer' on group title.

Nishant Jogi
on 1/6/15, 12:07 PM

I want to change in my custom module.

on 1/7/15, 5:04 AM

I checked the code, but still the same in interface. But while debugging i get rt['customer'] = 'Customer'. not displaying in interface

on 1/7/15, 5:06 AM

rt['customer'] here customer means the Boolean field name. = 'Customer' means the string which you want to display.

Nishant Jogi
on 1/7/15, 11:10 AM

i gave my boolean field, when i printed the value,it is displaying in the debugging portion. But in interface still the same. True / False

on 1/8/15, 3:31 AM

Ludo - 21South

--Ludo - 21South--
| 2 2 5
Zwijndrecht, Netherlands
--Ludo - 21South--


Ludo - 21South
On 12/31/14, 6:39 AM

So, let me get this straight. You created a boolean (true or false) and you want to group your results by this value. Then when you select the "group-by" it shows to unfoldable results, namely "true" and "false"? Is this correct?

If so, I can't think of any alternative way to do this. The value is going to be either true or false, there is no in between.

I know that. Can change true or false name occuring in the filter result by any attribute? I want to dispaly field name there in the filter view. Is it possible?

on 12/31/14, 7:06 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 12/31/14, 5:46 AM
Seen: 2353 times
Last updated: 3/16/15, 8:10 AM