<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="project_task_inherit_form_view" model="ir.ui.view">
        <field name="name">project.task.inherit.form.view</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_form2" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='project_id']" position="after">
                <field name="sprint_id" />
            </xpath>
        </field>
    </record>
    <record id="project_task_inherit_tree_view" model="ir.ui.view">
        <field name="name">project.task.inherit.tree.view</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_tree2" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='project_id']" position="after">
                <field name="sprint_id" />
            </xpath>
        </field>
    </record>
    <record id="project_task_inherit_search_view" model="ir.ui.view">
        <field name="name">project.task.inherit.search.view</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_search_form" />
        <field name="arch" type="xml">
            <xpath expr="//group" position="before">
                <separator />
                <filter
                    name="sprint_in_progress_task"
                    string="Sprint In Progress"
                    domain="[('sprint_state', '=', 'in_progress')]"
                />
            </xpath>
            <xpath expr="//group" position="inside">
                <filter
                    name="sprint_id"
                    string="Sprint"
                    context="{'group_by':'sprint_id'}"
                />
            </xpath>
        </field>
    </record>
    <record id="view_task_timeline" model="ir.ui.view">
        <field name="model">project.task</field>
        <field name="type">timeline</field>
        <field name="inherit_id" ref="project_timeline.project_task_timeline" />
        <field name="arch" type="xml">
            <xpath expr="//timeline" position="attributes">
                <attribute name="default_group_by">sprint_id</attribute>
                <attribute name="event_open_popup">False</attribute>
                <attribute name="dependency_arrows">False</attribute>
            </xpath>

        </field>
    </record>

</odoo>
