<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 Change 2 improve - Eduardo Magdalena
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo>
    <record id="view_task_search_form" model="ir.ui.view">
        <field name="name">Project Parent Tasks View Search Form</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_search_form" />
        <field name="arch" type="xml">
            <xpath expr="//filter[@name='no_rating']" position="after">
                <filter
                    string="Parent tasks"
                    name="parent_only"
                    domain="[('parent_id','=',False)]"
                />
            </xpath>
            <xpath expr="//filter[@name='group_create_date']" position="after">
                <filter
                    name="parent_task"
                    string="Parent tasks"
                    context="{'group_by' : 'parent_id'}"
                />
            </xpath>
        </field>
    </record>

    <record id="view_task_kanban_subtask" model="ir.ui.view">
        <field name="name">project.task.kanban</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_kanban" />
        <field name="arch" type="xml">

            <kanban position="inside">
                <field name="allow_subtasks" />
            </kanban>
            <field name="color" position="after">
                <field name="subtask_count" />
                <field name="parent_id" />
            </field>
            <xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
                <div
                    class="pull-right"
                    groups="base.group_user"
                    style="margin-left: 10px;"
                >
                    <t
                        attrs="{'invisible': [('allow_subtasks', '=', False)]}"
                        groups="project.group_subtask_project"
                    >
                        <a
                            type="object"
                            name="action_subtask"
                            style="font-weight:bold;color:green"
                        >
                            <span class="fa fa-angle-double-right fa-lg" />
                            <span>
                                <field name="subtask_count" />
                            </span>
                        </a>
                    </t>
                </div>
            </xpath>
        </field>
    </record>
</odoo>
