<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017 Tecnativa - Sergio Teruel
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="task_type_edit" model="ir.ui.view">
        <field name="model">project.task.type</field>
        <field name="inherit_id" ref="project.task_type_edit" />
        <field name="arch" type="xml">
            <field name="fold" position="after">
                <field name="invoiceable" />
            </field>
        </field>
    </record>
    <record id="edit_project_task_track" model="ir.ui.view">
        <field name="name">project.task.form.track</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_form2" />
        <field name="arch" type="xml">
            <div name="button_box" position="inside">
                <!-- The invoiceable field must be maintained for the tests with
                 Form() to work correctly. -->
                <field name="invoiceable" invisible="1" />
                <button
                    name="toggle_invoiceable"
                    type="object"
                    invisible="not invoicing_finished_task"
                    class="oe_stat_button"
                    icon="fa-file"
                >
                    <span
                        class="text-success"
                        invisible="not invoiceable"
                    >Invoiceable</span>
                    <span
                        class="text-danger"
                        invisible="invoiceable"
                    >Not Invoiceable</span>
                </button>
            </div>
        </field>
    </record>
</odoo>
