Skip to Content
Menu
This question has been flagged
2 Replies
7933 Rodiniai

Hello,

I know how to code python filters or groups for example:

    <filter string="Current year" name="anneescolaire" domain="[('default_school_year','=',True),('period_school_year','=',False)]"/>

In the Odoo interface, I saw that it is possible to add a favorite filter. Is it possible to code a favorite filter?

thank you 

Portretas
Atmesti
Best Answer

Hi,

yes you can via preparing the data for ir.filters record. The exmaple for crm.leads:

        <record id="myfavorite_filter" model="ir.filters">
            <field name="name">My favorite</field>
            <field name="model_id">crm.lead</field>
            <field name="user_id" eval="False"/>
            <field name="is_default">True</field>
            <field name="domain">[['stage_id.name', '=', 'Won']]</field>
            <field name="context">{'group_by': ['stage_id', 'user_id']}</field>
        </record>
Portretas
Atmesti

Is it possible to set Everybody's calendar as default, and remove the list of favorites? Thanks!

Autorius Best Answer

Thanks you !

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
saus. 25
1540
1
kov. 25
652
1
rugs. 23
2816
8
birž. 20
22221
1
bal. 20
53