<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="project_project_view_form_inherit" model="ir.ui.view">
        <field name="name">project.project.view.form.inherit</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.edit_project" />
        <field name="arch" type="xml">
            <xpath expr="//div[@name='button_box']" position="inside">
                <button
                    class="oe_stat_button"
                    name="action_sprints"
                    type="object"
                    groups="project.group_project_manager"
                    icon="fa-hourglass"
                >
                    <div class="o_field_widget o_stat_info">
                        <span class="o_stat_value">
                            <field name="sprint_count" nolabel="1" />
                        </span>
                        <span class="o_stat_text">
                            Sprints
                        </span>
                    </div>
                </button>
                <button
                    class="oe_stat_button"
                    name="action_backlog"
                    type="object"
                    groups="project.group_project_manager"
                    icon="fa-archive"
                >
                    <div class="o_field_widget o_stat_info">
                        <span class="o_stat_value">
                            <field name="backlog_count" nolabel="1" />
                        </span>
                        <span class="o_stat_text">
                            Backlog
                        </span>
                    </div>
                </button>
            </xpath>
        </field>
    </record>
    <record id="project_project_view_kanban_inherit" model="ir.ui.view">
        <field name="name">project.project.view.kanban.inherit</field>
        <field name="model">project.project</field>
        <field name="inherit_id" ref="project.view_project_kanban" />
        <field name="arch" type="xml">
            <xpath expr="//div[hasclass('o_kanban_manage_view')]" position="inside">
                <div role="menuitem" groups="project.group_project_manager">
                    <a name="action_sprints" type="object">Sprints</a>
                </div>
                <div role="menuitem" groups="project.group_project_manager">
                    <a name="action_backlog" type="object">Backlog</a>
                </div>
            </xpath>
            <xpath
                expr="//div[hasclass('o_kanban_manage_reporting')]"
                position="inside"
            >
                <div role="menuitem" groups="project.group_project_manager">
                    <a name="action_sprint_timeline" type="object">Sprints Timeline</a>
                </div>
            </xpath>
        </field>
    </record>
</odoo>
