Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
7817 Lượt xem

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 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>
Ảnh đại diện
Huỷ bỏ

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

Tác giả Câu trả lời hay nhất

Thanks you !

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 1 25
1434
1
thg 3 25
652
1
thg 9 23
2698
8
thg 6 20
21990
1
thg 4 20
53