Odoo Help

0

Not able to set filter as default in odoo11

By
Prasath
on 6/11/18, 9:40 AM 233 views

Trying to set a default filter for the calendar module

Tried the following code, but it is not working

 <record id="view_calendar_event_search_extn" model="ir.ui.view">
        <field name="name">calendar.event.search</field>
        <field name="model">calendar.event</field>
        <field name="inherit_id" ref="calendar.view_calendar_event_search"/>
        <field name="arch" type="xml">
           <search string="Search Meetings">
            <filter string="All Meetings" name="all_meetings" domain="[('Privacy','=','Everyone')]"/>
           </search>
        </field>
    </record>
    <record id="calendar_filter" model="ir.actions.act_window">
            <field name="name">Calendar</field>
            <field name="res_model">calendar.event</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,pivot,graph</field>
            <field name="view_id" eval="False"/>
            <field name="domain" eval="[('Privacy','=','Everyone')]"/>
            <field name="context">{'search_default_all_meetings': 1}</field>
            <field name="search_view_id" ref="view_calendar_event_search_extn"/>
            <field name="view_ids"
                   eval="[(5, 0, 0),
                          (0, 0, {'view_mode': 'form', 'view_id': ref('calendar.view_calendar_event_form_popup')}),
                          ]"/>
    </record>

0

Zbik

--Zbik--
6952
| 6 5 7
Lodz, Poland
--Zbik--


Zbik
On 6/13/18, 11:04 AM

Try this:

<filter string="All Meetings" name="all_meetings" domain="[('privacy','=','public')]"/>

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 6/11/18, 9:40 AM
Seen: 233 times
Last updated: 6/13/18, 11:04 AM