コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
7922 ビュー

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 

アバター
破棄
最善の回答

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>
アバター
破棄

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

著作者 最善の回答

Thanks you !

アバター
破棄
関連投稿 返信 ビュー 活動
0
1月 25
1537
1
3月 25
652
1
9月 23
2811
8
6月 20
22203
1
4月 20
53