Odoo modules related to events management
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

46 lines
1.9 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_event_form_inherit_event_to_calendar" model="ir.ui.view">
<field name="name">event.event.view.form.inherit</field>
<field name="model">event.event</field>
<field name="inherit_id" ref="event.view_event_form" />
<field name="arch" type="xml">
<xpath expr="//header/*[1]" position="before">
<button type="object" name="add_to_agenda" string="Add to my agenda" class="oe_highlight"
icon="fa-calendar-plus-o" attrs="{'invisible':[('in_user_agenda','=',True)]}" />
<button type="object" name="remove_from_agenda" string="Remove from my agenda" class="btn btn-secondary"
icon="fa-calendar-minus-o" attrs="{'invisible':[('in_user_agenda','!=',True)]}" />
</xpath>
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
<button type="object" name="display_meetings" class="oe_stat_button" icon="fa-calendar">
<field name="meeting_count" widget="statinfo" string="Meetings" />
</button>
</xpath>
<field name="date_tz" position="after">
<field name="in_user_agenda" invisible="1" />
</field>
</field>
</record>
<record id="event_add_to_agenda_action_server" model="ir.actions.server">
<field name="name">Add to agenda</field>
<field name="model_id" ref="event.model_event_event" />
<field name="binding_model_id" ref="event.model_event_event" />
<field name="state">code</field>
<field name="code">if records:
records.add_to_agenda()
</field>
</record>
<record id="event_remove_from_agenda_action_server" model="ir.actions.server">
<field name="name">Remove from agenda</field>
<field name="model_id" ref="event.model_event_event" />
<field name="binding_model_id" ref="event.model_event_event" />
<field name="state">code</field>
<field name="code">if records:
records.remove_from_agenda()
</field>
</record>
</odoo>