<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright 2024-2025 Nexa Systems Inc.
    License OPL-1 (Odoo Proprietary License v1.0)
    Part of the Fusion Claim Assistant product family.
-->
<odoo>
    <!-- Landscape Paper Format -->
    <record id="paperformat_a4_landscape" model="report.paperformat">
        <field name="name">A4 Landscape (Fusion Central)</field>
        <field name="default" eval="False"/>
        <field name="format">A4</field>
        <field name="orientation">Landscape</field>
        <field name="margin_top">20</field>
        <field name="margin_bottom">20</field>
        <field name="margin_left">7</field>
        <field name="margin_right">7</field>
        <field name="header_line" eval="False"/>
        <field name="header_spacing">20</field>
        <field name="dpi">90</field>
    </record>

    <!-- Sale Order / Quotation Reports - Only Portrait -->
    <record id="action_report_saleorder_portrait" model="ir.actions.report">
        <field name="name">Quotation / Order (Portrait - ADP)</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_saleorder_portrait</field>
        <field name="report_file">fusion_claims.report_saleorder_portrait</field>
        <field name="print_report_name">(object.state in ('draft', 'sent') and 'Quotation - %s' % object.name) or 'Order - %s' % object.name</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
    </record>

    <!-- Landscape ADP report - also attached to quotation/order emails -->
    <record id="action_report_saleorder_landscape" model="ir.actions.report">
        <field name="name">Quotation / Order (Landscape - ADP)</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_saleorder_landscape</field>
        <field name="report_file">fusion_claims.report_saleorder_landscape</field>
        <field name="print_report_name">'%s - %s' % (object.name, object.partner_id.name)</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
        <field name="paperformat_id" ref="paperformat_a4_landscape"/>
    </record>

    <!-- Invoice Reports -->
    <record id="action_report_invoice_portrait" model="ir.actions.report">
        <field name="name">Invoice (Portrait)</field>
        <field name="model">account.move</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_invoice_portrait</field>
        <field name="report_file">fusion_claims.report_invoice_portrait</field>
        <field name="print_report_name">'Invoice - %s' % object.name</field>
        <field name="binding_model_id" ref="account.model_account_move"/>
        <field name="binding_type">report</field>
    </record>

    <!-- Landscape Invoice - REMOVED FROM MENU (no binding) -->
    <record id="action_report_invoice_landscape" model="ir.actions.report">
        <field name="name">Invoice (Landscape - ADP)</field>
        <field name="model">account.move</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_invoice_landscape</field>
        <field name="report_file">fusion_claims.report_invoice_landscape</field>
        <field name="print_report_name">'Invoice - %s' % object.name</field>
        <!-- No binding_model_id - removed from print menu -->
        <field name="binding_type">report</field>
        <field name="paperformat_id" ref="paperformat_a4_landscape"/>
    </record>

    <!-- =============================================================== -->
    <!-- ADP Proof of Delivery Report -->
    <!-- =============================================================== -->
    <record id="action_report_proof_of_delivery" model="ir.actions.report">
        <field name="name">ADP Proof of Delivery</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_proof_of_delivery</field>
        <field name="report_file">fusion_claims.report_proof_of_delivery</field>
        <field name="print_report_name">'ADP Proof of Delivery - %s' % object.name</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
    </record>

    <!-- =============================================================== -->
    <!-- Standard Proof of Delivery Report -->
    <!-- =============================================================== -->
    <record id="action_report_proof_of_delivery_standard" model="ir.actions.report">
        <field name="name">Proof of Delivery</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_proof_of_delivery_standard</field>
        <field name="report_file">fusion_claims.report_proof_of_delivery_standard</field>
        <field name="print_report_name">'Proof of Delivery - %s' % object.name</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
    </record>

    <!-- =============================================================== -->
    <!-- Proof of Pickup Report (for rental returns) -->
    <!-- =============================================================== -->
    <record id="action_report_proof_of_pickup" model="ir.actions.report">
        <field name="name">Proof of Pickup</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_proof_of_pickup</field>
        <field name="report_file">fusion_claims.report_proof_of_pickup</field>
        <field name="print_report_name">'Proof of Pickup - %s' % object.name</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
    </record>


    <!-- =============================================================== -->
    <!-- Grab Bar Installation Waiver Report -->
    <!-- =============================================================== -->
    <record id="action_report_grab_bar_waiver" model="ir.actions.report">
        <field name="name">Grab Bar Installation Waiver</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_grab_bar_waiver</field>
        <field name="report_file">fusion_claims.report_grab_bar_waiver</field>
        <field name="print_report_name">'Grab Bar Waiver - %s' % object.name</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
    </record>

    <!-- =============================================================== -->
    <!-- Accessibility Equipment Contract Report -->
    <!-- =============================================================== -->
    <record id="action_report_accessibility_contract" model="ir.actions.report">
        <field name="name">Accessibility Equipment Contract</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_accessibility_contract</field>
        <field name="report_file">fusion_claims.report_accessibility_contract</field>
        <field name="print_report_name">'Accessibility Contract - %s' % object.name</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
    </record>

    <!-- =============================================================== -->
    <!-- Approved Items Report (Landscape) -->
    <!-- =============================================================== -->
    <record id="action_report_approved_items" model="ir.actions.report">
        <field name="name">Approved Items Report</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_approved_items</field>
        <field name="report_file">fusion_claims.report_approved_items</field>
        <field name="print_report_name">'Approved Items - %s - %s' % (object.name, object.partner_id.name)</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
        <field name="paperformat_id" ref="paperformat_a4_landscape"/>
    </record>

    <!-- =============================================================== -->
    <!-- March of Dimes Quotation Report -->
    <!-- =============================================================== -->
    <record id="action_report_mod_quotation" model="ir.actions.report">
        <field name="name">March of Dimes Quotation</field>
        <field name="model">sale.order</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_mod_quotation</field>
        <field name="report_file">fusion_claims.report_mod_quotation</field>
        <field name="print_report_name">'MOD Quotation - %s' % object.name</field>
        <field name="binding_model_id" ref="sale.model_sale_order"/>
        <field name="binding_type">report</field>
    </record>

    <!-- =============================================================== -->
    <!-- March of Dimes Invoice Report -->
    <!-- =============================================================== -->
    <record id="action_report_mod_invoice" model="ir.actions.report">
        <field name="name">March of Dimes Invoice</field>
        <field name="model">account.move</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">fusion_claims.report_mod_invoice</field>
        <field name="report_file">fusion_claims.report_mod_invoice</field>
        <field name="print_report_name">'MOD Invoice - %s' % object.name</field>
        <field name="binding_model_id" ref="account.model_account_move"/>
        <field name="binding_type">report</field>
    </record>
</odoo>
