<!-- views/business_performance_wizard_view.xml -->
<odoo>
<record id="action_business_performance_report_custom" model="ir.actions.report">
    <field name="name">Business Performance Report</field>
    <field name="model">sos_business_performance_wizard</field>
    <field name="report_type">qweb-html</field>
    <field name="report_name">sos_sales.report_business_performance</field>
    <field name="paperformat_id" ref="sos_sales.report_paperformat_landscape"/>
    <field name="print_report_name">'Business Performance Report - %s' % (object.user_id.name if object.user_id else 'All')</field>
</record>
<record id="view_business_performance_wizard" model="ir.ui.view">
    <field name="name">sos_business_performance_wizard.form</field>
    <field name="model">sos_business_performance_wizard</field>
    <field name="arch" type="xml">
        <form string="Business Performance Report">
            <group>
            <field name="category"/>
                <field name="sales_person_id" invisible="category == 'export'"/> 
            </group>
            <footer>
                <button name="print_report" type="object" string="Generate Report" class="btn-primary"/>
                <button string="Cancel" class="btn-secondary" special="cancel"/>
            </footer>
        </form>
    </field>
</record>
</odoo>

