helpdesk_ticket.xml 1.47 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="helpdesk_ticket_form_maintenance" model="ir.ui.view">
            <field name="name">helpdesk.ticket.form.inherit.maintenance</field>
            <field name="model">helpdesk.ticket</field>
            <field name="inherit_id" ref="sh_all_in_one_helpdesk.helpdesk_ticket_form_view"/>
            <field name="priority" eval="18"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='priority']" position="after">
                    <field name="is_maintenance" invisible="1"/>
                    <field name="maintenance_type_id" attrs="{'invisible':[('is_maintenance', '=', False)]}"/>
13
                    <field name="severity_type" attrs="{'invisible':[('is_maintenance', '=', False)]}"/>
14 15 16
                    <field name="date_fail" attrs="{'invisible':[('is_maintenance', '=', False)]}"/>
                    <field name="fail_type" attrs="{'invisible':[('is_maintenance', '=', False)]}"/>
                </xpath>
17 18 19 20 21 22
                <xpath expr="//field[@name='priority']" position="attributes">
                    <attribute name="attrs">{'invisible':[('is_maintenance','=',True)]}</attribute>
                </xpath>
                <xpath expr="//field[@name='category_id']" position="attributes">
                    <attribute name="attrs">{'invisible':[('is_maintenance','=',True)]}</attribute>
                </xpath>
23 24 25 26
            </field>
        </record>
    </data>
</odoo>