This question has been flagged

Hello,

I need to change the value of attribute "use_contacts" in calendar.event model through "xml_id" of user group:

The new code inherit from calendar.view_calendar_event_calendar, the code is:

<?xml version="1.0"?>
<openerp>
<data>
<!-- CRM Meeting Calendar -->
<record model="ir.ui.view" id="crm_view_calendar_event_calendar">
<field name="name">Meetings Calendar</field>
<field name="model">calendar.event</field>
<field name="inherit_id" ref="calendar.view_calendar_event_calendar"/>
<field name="priority" eval="2"/>
<field name="use_contacts" eval="?????"/>
<field name="arch" type="xml">
<xpath expr="//calendar" position="replace">
<calendar string="Meetings" date_start="start" date_stop="stop" date_delay="duration" all_day="allday"
display="[name]" color="color_partner_id" attendee="partner_ids" avatar_model="res.partner"
use_contacts="[use_contacts]"
event_open_popup="%(calendar.view_calendar_event_form_popup)s">
<field name="name"/>
<field name="user_id"/>
<field name="color_partner_id"/>
<field name="partner_ids"/>
</calendar>
</xpath>
</field>
</record>
</data>
</openerp>
With this line code it doesn't works <field name="use_contacts" eval="?????"/> where ????? is replaced by [(3,ref('my_module.my_group_name'))]

I need to find another solution or alternative.

Thank you!

Avatar
Discard

Use_contact, is a boolean to specify if you want to use your "favorite coworker" as filter or not. If you want filter on a specific field, you need to set it to false and use attendee="your field"... What is your my_module.my_group_name?