<?xml version="1.0" encoding="utf-8" ?>
<!-- © 2017-2019 Elico Corp (https://www.elico-corp.com).
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). -->
<odoo>
    <record id="edit_project" model="ir.ui.view">
        <field name="name">project.project.form</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.edit_project" />
        <field name="arch" type="xml">
            <field name="user_id" position="after">
                <field name="parent_id" />
            </field>
            <div name="button_box" position="inside">
                <button
                    name="action_open_child_project"
                    class="oe_stat_button"
                    type="object"
                    icon="fa-tasks"
                    attrs="{'invisible': [('child_ids_count', '=', 0)]}"
                >
                    <field
                        string="Child Projects"
                        name="child_ids_count"
                        widget="statinfo"
                    />
                </button>
            </div>
        </field>
    </record>
    <record id="view_project" model="ir.ui.view">
        <field name="name">project.project.tree</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.view_project" />
        <field name="arch" type="xml">
            <field name="partner_id" position="after">
                <field name="parent_id" />
            </field>
        </field>
    </record>
    <record id="view_project_kanban" model="ir.ui.view">
        <field name="name">project.project.kanban.inherited</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.view_project_kanban" />
        <field name="arch" type="xml">
            <field name="rating_status" position="after">
                <field name="parent_id" />
            </field>
            <xpath
                expr="//div[hasclass('o_project_kanban_main')]/div[last()]"
                position="after"
            >
                <div class="o_primary">
                    <span>
                        <t t-esc="record.parent_id.value" />
                    </span>
                </div>
            </xpath>
        </field>
    </record>
    <record id="view_project_project_filter" model="ir.ui.view">
        <field name="name">project.project.filter</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.view_project_project_filter" />
        <field name="type">search</field>
        <field name="arch" type="xml">
            <field name="name" position="after">
                <field name="parent_id" />
            </field>
        </field>
    </record>
</odoo>
