Files
odoo_source/addons/calendar/views/mail_activity_views.xml
T
XavierDo 47496b9fe5 [IMP] mail: add force_next on activity type
A new field on activity type allow to change the behaviour of mark done & schedule next:
-marking as done will automatically schedule the next activity, based on the default_next_activity.
-It should also be impossible to edit an activity when this flag is on.

task: #1884521
2018-09-18 13:44:00 +02:00

49 lines
2.5 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'), ('force_next', '=', True)]}</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>