<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="analysis_wizard" model="ir.ui.view">
        <field name="name">Sales Analysis report</field>
        <field name="model">sale.report.analysis</field>
        <field name="arch" type="xml">
            <form>
                <group col="1">
                    <field name="from_date"/>
                    <field name="to_date"/>
                </group>
                <group>
                    <field name="customer_ids" widget="many2many_tags"/>
                    <field name="status" widget="radio"/>

                </group>
                <group>
                    <field name="product_ids" widget="many2many_tags" attrs="{'invisible': [('print_type', '=', 'sale')]}"/>
                    <field name="print_type" widget="radio"/>

                </group>
                <footer>
                    <button name="get_analysis_report" string="PDF Report"
                            type="object" class="btn-primary"/>
                    <button name="get_excel_analysis_report" string="XLSX Report"
                            type="object" class="btn-primary"/>
                </footer>
            </form>
        </field>
    </record>
    <record id="sale_analysis_report" model="ir.actions.act_window">
        <field name="name">Sales Analysis Report</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">sale.report.analysis</field>
        <field name="view_mode">form</field>
        <field name="view_id" ref="analysis_wizard"/>
        <field name="target">new</field>
    </record>
</odoo>