Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4244 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
kvě 17
3288
0
čvc 15
3408
1
bře 15
18734
1
bře 15
4737
0
čvc 25
676