Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4237 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
may 17
3276
0
jul 15
3401
1
mar 15
18721
1
mar 15
4733
0
jul 25
626