<?xml version="1.0"?>
<data><field name="invoice_policy" position="attributes">
                <attribute name="invisible">False</attribute>
                <attribute name="attrs">{'invisible': [('type', '=', 'service'), ('sale_ok', '=', True)]}</attribute>
            </field>
            <field name="invoice_policy" position="after">
                <field name="service_policy" string="Invoicing Policy" attrs="{'invisible': ['|', ('type', '!=', 'service'), ('sale_ok', '=', False)], 'required': [('type', '=', 'service'), ('sale_ok', '=', True)]}"/>
                <field name="service_tracking" required="1" attrs="{'invisible': [('type', '!=', 'service')]}"/>
                <field name="project_id" context="{'default_allow_billable': True}" attrs="{'invisible':[('service_tracking','!=','task_global_project')], 'required':[('service_tracking','==','task_global_project')]}"/>
                <field name="project_template_id" context="{'active_test': False, 'default_allow_billable': True}" attrs="{'invisible':[('service_tracking','not in',['task_in_project', 'project_only'])]}"/>
            </field>
        </data>