Skip to Content
Menu
This question has been flagged
1 Reply
3296 Views

Hello, I have two questions about filters in Odoo 8.

1) Accidentally, I have deleted a favorite filter. How can I restore it?

2) I have added a filter by code and I can see this in the admin user, but not in the other users. How can I set the user permissions for the filter?

This is the filter code

<record id="agrupar_por_chofer" model="ir.filters">
        <field name="name">Agrupar por chofer</field>
        <field name="model_id">sale.order</field>
        <field name="domain">[]</field>
        <field name="create_uid" eval="False"/>
        <field name="context">{'group_by': ['chofer']}</field>
    </record>

Avatar
Discard
Best Answer

Hi,

You need to add "False" value inside "user_id" field inside your record of ir.filters. Please have a look on the below record. It will apply for all the users not only for Admin / selected users.

<record id="agrupar_por_chofer" model="ir.filters">
<field name="name">Agrupar por chofer</field>
<field name="model_id">sale.order</field>
<field name="domain">[]</field>
        <field name="user_id" eval="False"/> 
<field name="context">{'group_by': ['chofer']}</field>
</record>


It will resolve your issue and filter will visible to all users. If you want to set for particular user then you can give the value of "user_id" field inside record.

I am sure that it is very useful to you.

thanks.

Avatar
Discard
Related Posts Replies Views Activity
0
May 17
2601
0
Jul 15
2598
1
Mar 15
17347
1
Mar 15
3932
1
Jun 24
3679