summaryrefslogtreecommitdiff
path: root/addons/calendar/views/mail_activity_views.xml
blob: 53be74a3b911272ba65efc104d5c5095df81257c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0"?>
<odoo>

    <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'), ('id', '!=', False)]}</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>