<?xml version="1.0" encoding="utf-8" ?>
<odoo>
        <!-- Management System Audit Report Pivot View -->
        <record id="view_report_mgmtsystem_audit_pivot" model="ir.ui.view">
            <field name="name">mgmtsystem.audit.report.pivot</field>
            <field name="model">mgmtsystem.audit</field>
            <field name="arch" type="xml">
                <pivot string="Audit" disable_linking="True">
                    <field name="state" type="row" />
                    <field name="user_id" type="col" />
                    <field name="number_of_audits" type="measure" />
                </pivot>
            </field>
        </record>

        <!-- Management System Audit Graph View -->

        <record id="view_report_mgmtsystem_audit_graph" model="ir.ui.view">
            <field name="name">mgmtsystem.audit.report.graph</field>
            <field name="model">mgmtsystem.audit</field>
            <field name="arch" type="xml">
                <graph string="Audit">
                    <field name="state" />
                    <field name="user_id" />
                    <field name="number_of_audits" type="measure" />
                </graph>
            </field>
        </record>

        <!-- Management System Audit Report Action -->

        <record id="action_report_mgmtsystem_audit" model="ir.actions.act_window">
            <field name="name">Management System Audit Analysis</field>
            <field name="res_model">mgmtsystem.audit</field>
            <field name="view_mode">pivot,graph</field>
            <field
            name="context"
        >{"search_default_year":1,"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
            <field name="view_id" />
            <!-- force empty -->
            <field
            name="help"
        >Have a general overview of all audits processed in the system by sorting them with specific criteria.</field>
        </record>

        <menuitem
        name="Audits"
        id="menu_report_mgmtsystem_audit_tree"
        action="action_report_mgmtsystem_audit"
        parent="mgmtsystem.menu_mgmtsystem_report"
        sequence="20"
    />
</odoo>
