Files
odoo_source/addons/calendar/views/mail_activity_views.xml
T
Thibault Delavallée c879fb0f00 [IMP] calendar: improve scheduling meeting activities
After feedback from various uses, some improvements are made on the form view
to schedule an activity linked to meeting type

 * renaming the button to be more obvious that the user will be redirected
   to the calendar to schedule the meeting;
 * remove the note field to have a smaller form;

This commit is related to task ID 1819812. Closes #24169.
2018-06-08 17:39:30 +02:00

49 lines
2.4 KiB
XML

<?xml version="1.0"?>
<odoo>
<record id="mail_activity_type_view_form" model="ir.ui.view">
<field name="name">mail.activity.type.form.inherit.calendar</field>
<field name="model">mail.activity.type</field>
<field name="inherit_id" ref="mail.mail_activity_type_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='category']" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
</field>
</record>
<record id="mail_activity_view_form_popup" model="ir.ui.view">
<field name="name">mail.activity.form.inherit.calendar</field>
<field name="model">mail.activity</field>
<field name="inherit_id" ref="mail.mail_activity_view_form_popup"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date_deadline']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
</xpath>
<xpath expr="//button[@name='action_close_dialog']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
</xpath>
<xpath expr="//button[@name='action_done']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
</xpath>
<xpath expr="//button[@special='cancel']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
</xpath>
<xpath expr="//field[@name='note']" position="attributes">
<attribute name="attrs">{'invisible': [('activity_category', '=', 'meeting')]}</attribute>
</xpath>
<xpath expr="//button[@name='action_close_dialog']" position="before">
<button string="Open Calendar"
attrs="{'invisible': [('activity_category', '!=', 'meeting')]}"
name="action_create_calendar_event"
type="object"
class="btn-primary"/>
</xpath>
</field>
</record>
</odoo>