Odoo Help

0

Questions about filters

By
José
on 7/8/15, 10:27 AM 950 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>

2

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.

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.

Register

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

1 follower(s)

Stats

Asked: 7/8/15, 10:27 AM
Seen: 950 times
Last updated: 7/9/15, 9:22 AM