<?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>
    <!-- ===================================================================== -->
    <!-- ADP DEVICE CODES VIEWS -->
    <!-- ===================================================================== -->
    
    <!-- Device Codes List View -->
    <record id="view_fusion_adp_device_code_list" model="ir.ui.view">
        <field name="name">fusion.adp.device.code.list</field>
        <field name="model">fusion.adp.device.code</field>
        <field name="arch" type="xml">
            <list string="ADP Device Codes">
                <field name="device_code"/>
                <field name="device_type"/>
                <field name="manufacturer" optional="show"/>
                <field name="build_type" optional="show"/>
                <field name="device_description" optional="hide"/>
                <field name="adp_price"/>
                <field name="max_quantity"/>
                <field name="sn_required"/>
                <field name="last_updated" optional="hide"/>
            </list>
        </field>
    </record>

    <!-- Device Codes Form View -->
    <record id="view_fusion_adp_device_code_form" model="ir.ui.view">
        <field name="name">fusion.adp.device.code.form</field>
        <field name="model">fusion.adp.device.code</field>
        <field name="arch" type="xml">
            <form string="ADP Device Code">
                <sheet>
                    <div class="oe_title">
                        <label for="device_code"/>
                        <h1>
                            <field name="device_code" placeholder="Device Code"/>
                        </h1>
                    </div>
                    <group>
                        <group string="Device Information">
                            <field name="device_type"/>
                            <field name="manufacturer"/>
                            <field name="build_type"/>
                            <field name="device_description"/>
                        </group>
                        <group string="Pricing">
                            <field name="adp_price"/>
                            <field name="max_quantity"/>
                        </group>
                    </group>
                    <group>
                        <group string="Requirements">
                            <field name="sn_required"/>
                            <field name="active"/>
                        </group>
                        <group string="Tracking">
                            <field name="last_updated" readonly="1"/>
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <!-- Device Codes Search View -->
    <record id="view_fusion_adp_device_code_search" model="ir.ui.view">
        <field name="name">fusion.adp.device.code.search</field>
        <field name="model">fusion.adp.device.code</field>
        <field name="arch" type="xml">
            <search string="Search Device Codes">
                <field name="device_code"/>
                <field name="device_type"/>
                <field name="manufacturer"/>
                <field name="device_description"/>
                <separator/>
                <filter string="Serial Required" name="sn_required" domain="[('sn_required', '=', True)]"/>
                <filter string="Modular" name="filter_modular" domain="[('build_type', '=', 'modular')]"/>
                <filter string="Custom Fabricated" name="filter_custom" domain="[('build_type', '=', 'custom_fabricated')]"/>
                <separator/>
                <filter string="Device Type" name="group_device_type" context="{'group_by': 'device_type'}"/>
                <filter string="Manufacturer" name="group_manufacturer" context="{'group_by': 'manufacturer'}"/>
                <filter string="Build Type" name="group_build_type" context="{'group_by': 'build_type'}"/>
            </search>
        </field>
    </record>

    <!-- Device Codes Action -->
    <record id="action_fusion_adp_device_codes" model="ir.actions.act_window">
        <field name="name">ADP Device Codes</field>
        <field name="res_model">fusion.adp.device.code</field>
        <field name="view_mode">list,form</field>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                Import ADP Device Codes from Mobility Manual
            </p>
            <p>
                Device codes define the maximum price ADP will cover for each device,
                the maximum quantity per claim, and whether a serial number is required.
            </p>
        </field>
    </record>

    <!-- ===================================================================== -->
    <!-- ADP SALE ORDER VIEWS -->
    <!-- ===================================================================== -->

    <!-- Sale Order Kanban for ADP Status -->
    <record id="view_sale_order_kanban_adp" model="ir.ui.view">
        <field name="name">sale.order.kanban.adp</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <kanban class="o_kanban_mobile" default_group_by="x_fc_adp_application_status"
                    group_create="0" group_delete="0" group_edit="0"
                    records_draggable="0">
                <field name="name"/>
                <field name="partner_id"/>
                <field name="amount_total"/>
                <field name="x_fc_adp_portion_total"/>
                <field name="x_fc_client_portion_total"/>
                <field name="x_fc_adp_application_status"/>
                <field name="x_fc_claim_number"/>
                <field name="x_fc_client_type"/>
                <field name="date_order"/>
                <field name="currency_id"/>
                <templates>
                    <t t-name="card">
                        <div class="row">
                            <div class="col-8">
                                <strong><field name="name"/></strong>
                            </div>
                            <div class="col-4 text-end">
                                <field name="x_fc_adp_application_status" widget="badge"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12">
                                <field name="partner_id"/>
                            </div>
                        </div>
                        <div class="row mt-2">
                            <div class="col-6">
                                <small class="text-muted">Claim:</small><br/>
                                <field name="x_fc_claim_number"/>
                            </div>
                            <div class="col-6 text-end">
                                <small class="text-muted">Client Type:</small><br/>
                                <field name="x_fc_client_type"/>
                            </div>
                        </div>
                        <div class="row mt-2">
                            <div class="col-6">
                                <small class="text-muted">ADP Portion:</small><br/>
                                <field name="x_fc_adp_portion_total" widget="monetary"/>
                            </div>
                            <div class="col-6 text-end">
                                <small class="text-muted">Client Portion:</small><br/>
                                <field name="x_fc_client_portion_total" widget="monetary"/>
                            </div>
                        </div>
                        <div class="row mt-2 border-top pt-2">
                            <div class="col-12 text-end">
                                <strong>Total: <field name="amount_total" widget="monetary"/></strong>
                            </div>
                        </div>
                    </t>
                </templates>
            </kanban>
        </field>
    </record>

    <!-- ADP Sales List View -->
    <record id="view_sale_order_list_adp" model="ir.ui.view">
        <field name="name">sale.order.list.adp</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <list string="ADP Sales" default_order="date_order desc, id desc">
                <field name="x_fc_status_sequence" column_invisible="1"/>
                
                <!-- Always visible -->
                <field name="name" string="Order"/>
                <field name="date_order" string="Date" optional="show"/>
                <field name="partner_id" string="Client"/>
                <field name="x_fc_claim_number" optional="show"/>
                <field name="x_fc_adp_application_status" widget="badge"
                       decoration-info="x_fc_adp_application_status in ('quotation','assessment_scheduled','assessment_completed','waiting_for_application')"
                       decoration-warning="x_fc_adp_application_status in ('needs_correction','on_hold','ready_submission')"
                       decoration-success="x_fc_adp_application_status in ('approved','approved_deduction','billed','case_closed')"
                       decoration-danger="x_fc_adp_application_status in ('denied','rejected','cancelled','expired','withdrawn')"
                       optional="show"/>
                
                <!-- Client / Sale info -->
                <field name="x_fc_sale_type" optional="hide"/>
                <field name="x_fc_client_type" optional="show"/>
                <field name="x_fc_authorizer_id" optional="hide"/>
                <field name="user_id" string="Sales Rep" optional="hide"/>
                <field name="x_fc_client_ref_1" string="Ref 1" optional="hide"/>
                <field name="x_fc_client_ref_2" string="Ref 2" optional="hide"/>
                
                <!-- Key dates -->
                <field name="x_fc_assessment_start_date" optional="hide"/>
                <field name="x_fc_assessment_end_date" optional="hide"/>
                <field name="x_fc_claim_authorization_date" string="Authorization Date" optional="hide"/>
                <field name="x_fc_claim_submission_date" string="Submission Date" optional="hide"/>
                <field name="x_fc_claim_approval_date" string="Approval Date" optional="hide"/>
                <field name="x_fc_adp_delivery_date" string="Delivery Date" optional="hide"/>
                <field name="x_fc_billing_date" optional="hide"/>
                
                <!-- Reason / Funding -->
                <field name="x_fc_reason_for_application" optional="hide"/>
                <field name="x_fc_previous_funding_date" optional="hide"/>
                <field name="x_fc_early_delivery" optional="hide"/>
                
                <!-- Amounts -->
                <field name="x_fc_adp_portion_total" widget="monetary" sum="Total ADP" optional="show"/>
                <field name="x_fc_client_portion_total" widget="monetary" sum="Total Client" optional="show"/>
                <field name="amount_total" widget="monetary" sum="Grand Total" optional="show"/>
                
                <!-- Status -->
                <field name="x_fc_on_hold_date" optional="hide"/>
                <field name="x_fc_case_locked" optional="hide"/>
                <field name="state" widget="badge" decoration-success="state == 'sale'" 
                       decoration-info="state == 'draft'" optional="hide"/>
            </list>
        </field>
    </record>

    <!-- ===================================================================== -->
    <!-- ADP SALE ORDER SEARCH VIEW -->
    <!-- ===================================================================== -->
    <record id="view_sale_order_search_adp" model="ir.ui.view">
        <field name="name">sale.order.search.adp</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <search string="Search ADP Orders">
                <field name="name" string="Order"
                    filter_domain="['|', '|', ('name', 'ilike', self), ('client_order_ref', 'ilike', self), ('partner_id', 'child_of', self)]"/>
                <field name="partner_id"/>
                <field name="x_fc_claim_number"/>
                <field name="x_fc_authorizer_id"/>
                <field name="x_fc_client_ref_1" string="Client Reference 1"/>
                <field name="x_fc_client_ref_2" string="Client Reference 2"/>
                <separator/>
                <!-- Status Filters - Active Workflow -->
                <filter string="Quotation" name="filter_quotation"
                        domain="[('x_fc_adp_application_status', '=', 'quotation')]"/>
                <filter string="Assessment Scheduled" name="filter_assessment_scheduled"
                        domain="[('x_fc_adp_application_status', '=', 'assessment_scheduled')]"/>
                <filter string="Assessment Completed" name="filter_assessment_completed"
                        domain="[('x_fc_adp_application_status', '=', 'assessment_completed')]"/>
                <filter string="Waiting for Application" name="filter_waiting_for_application"
                        domain="[('x_fc_adp_application_status', '=', 'waiting_for_application')]"/>
                <filter string="Application Received" name="filter_application_received"
                        domain="[('x_fc_adp_application_status', '=', 'application_received')]"/>
                <filter string="Ready for Submission" name="filter_ready_submission"
                        domain="[('x_fc_adp_application_status', '=', 'ready_submission')]"/>
                <filter string="Submitted" name="filter_submitted"
                        domain="[('x_fc_adp_application_status', '=', 'submitted')]"/>
                <filter string="Accepted by ADP" name="filter_accepted"
                        domain="[('x_fc_adp_application_status', '=', 'accepted')]"/>
                <filter string="Rejected by ADP" name="filter_rejected"
                        domain="[('x_fc_adp_application_status', '=', 'rejected')]"/>
                <filter string="Resubmitted" name="filter_resubmitted"
                        domain="[('x_fc_adp_application_status', '=', 'resubmitted')]"/>
                <filter string="Needs Correction" name="filter_needs_correction"
                        domain="[('x_fc_adp_application_status', '=', 'needs_correction')]"/>
                <filter string="Approved" name="filter_approved"
                        domain="[('x_fc_adp_application_status', '=', 'approved')]"/>
                <filter string="Approved with Deduction" name="filter_approved_deduction"
                        domain="[('x_fc_adp_application_status', '=', 'approved_deduction')]"/>
                <filter string="Ready for Delivery" name="filter_ready_delivery"
                        domain="[('x_fc_adp_application_status', '=', 'ready_delivery')]"/>
                <filter string="Ready to Bill" name="filter_ready_bill"
                        domain="[('x_fc_adp_application_status', '=', 'ready_bill')]"/>
                <filter string="Billed to ADP" name="filter_billed"
                        domain="[('x_fc_adp_application_status', '=', 'billed')]"/>
                <filter string="Case Closed" name="filter_case_closed"
                        domain="[('x_fc_adp_application_status', '=', 'case_closed')]"/>
                <separator/>
                <!-- Special Status Filters -->
                <filter string="On Hold" name="filter_on_hold"
                        domain="[('x_fc_adp_application_status', '=', 'on_hold')]"/>
                <filter string="Withdrawn" name="filter_withdrawn"
                        domain="[('x_fc_adp_application_status', '=', 'withdrawn')]"/>
                <filter string="Denied" name="filter_denied"
                        domain="[('x_fc_adp_application_status', '=', 'denied')]"/>
                <filter string="Cancelled" name="filter_cancelled"
                        domain="[('x_fc_adp_application_status', '=', 'cancelled')]"/>
                <filter string="Expired" name="filter_expired"
                        domain="[('x_fc_adp_application_status', '=', 'expired')]"/>
                <separator/>
                <!-- Group By -->
                <filter string="Status" name="group_status" context="{'group_by': 'x_fc_adp_application_status'}"/>
                <filter string="Client Type" name="group_client_type" context="{'group_by': 'x_fc_client_type'}"/>
                <filter string="Authorizer" name="group_authorizer" context="{'group_by': 'x_fc_authorizer_id'}"/>
                <filter string="Reason for Application" name="group_reason" context="{'group_by': 'x_fc_reason_for_application'}"/>
                <filter string="Sale Type" name="group_sale_type" context="{'group_by': 'x_fc_sale_type'}"/>
                <filter string="Salesperson" name="group_salesperson" context="{'group_by': 'user_id'}"/>
                <filter string="Create Month" name="group_create_month" context="{'group_by': 'create_date:month'}"/>
                <filter string="Create Quarter" name="group_create_quarter" context="{'group_by': 'create_date:quarter'}"/>
                <filter string="Create Year" name="group_create_year" context="{'group_by': 'create_date:year'}"/>
            </search>
        </field>
    </record>

    <!-- ===================================================================== -->
    <!-- DASHBOARD VIEWS (Graph and Pivot)                                     -->
    <!-- ===================================================================== -->

    <!-- Dashboard Graph View -->
    <record id="view_sale_order_graph_fusion" model="ir.ui.view">
        <field name="name">sale.order.graph.fusion.claims</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <graph string="Claims Dashboard" type="bar" sample="1">
                <field name="x_fc_sale_type"/>
                <field name="amount_total" type="measure"/>
            </graph>
        </field>
    </record>

    <!-- Dashboard Pivot View -->
    <record id="view_sale_order_pivot_fusion" model="ir.ui.view">
        <field name="name">sale.order.pivot.fusion.claims</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <pivot string="Claims Analysis" sample="1">
                <field name="x_fc_sale_type" type="row"/>
                <field name="amount_total" type="measure"/>
            </pivot>
        </field>
    </record>
    
    <!-- ===================================================================== -->
    <!-- ADP CLAIMS MENU ACTIONS -->
    <!-- ===================================================================== -->

    <!-- Dashboard action is defined in dashboard_views.xml -->

    <!-- All ADP Orders -->
    <record id="action_adp_orders_all" model="ir.actions.act_window">
        <field name="name">All ADP Orders</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True)]</field>
        <field name="context">{'default_x_fc_sale_type': 'adp', 'search_default_my_quotation': 1}</field>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                Create your first ADP sale order
            </p>
        </field>
    </record>

    <!-- 1. Quotation Stage -->
    <record id="action_adp_quotations" model="ir.actions.act_window">
        <field name="name">Quotation Stage</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'quotation')]</field>
        <field name="context">{'default_x_fc_sale_type': 'adp'}</field>
    </record>

    <!-- 2. Assessment Scheduled -->
    <record id="action_adp_assessment_scheduled" model="ir.actions.act_window">
        <field name="name">Assessment Scheduled</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'assessment_scheduled')]</field>
    </record>

    <!-- 3. Assessment Completed / Waiting for Application -->
    <record id="action_adp_assessment_completed" model="ir.actions.act_window">
        <field name="name">Waiting for Application</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', 'in', ('assessment_completed', 'waiting_for_application'))]</field>
    </record>

    <!-- 4. Application Received -->
    <record id="action_adp_application_received" model="ir.actions.act_window">
        <field name="name">Application Received</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'application_received')]</field>
    </record>

    <!-- 5. Ready for Submission -->
    <record id="action_adp_ready_submission" model="ir.actions.act_window">
        <field name="name">Ready for Submission</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'ready_submission')]</field>
    </record>

    <!-- 6. Application Submitted -->
    <record id="action_adp_pending_approval" model="ir.actions.act_window">
        <field name="name">Application Submitted</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', 'in', ['submitted', 'resubmitted'])]</field>
    </record>

    <!-- 6b. Accepted by ADP -->
    <record id="action_adp_accepted" model="ir.actions.act_window">
        <field name="name">Accepted by ADP</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'accepted')]</field>
    </record>

    <!-- 6c. Rejected by ADP -->
    <record id="action_adp_rejected" model="ir.actions.act_window">
        <field name="name">Rejected by ADP</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'rejected')]</field>
    </record>

    <!-- 7. Needs Correction -->
    <record id="action_adp_needs_correction" model="ir.actions.act_window">
        <field name="name">Needs Correction</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'needs_correction')]</field>
    </record>

    <!-- 8. Application Approved -->
    <record id="action_adp_approved" model="ir.actions.act_window">
        <field name="name">Application Approved</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', 'in', ['approved', 'approved_deduction'])]</field>
    </record>

    <!-- 9. Ready for Delivery -->
    <record id="action_adp_ready_delivery" model="ir.actions.act_window">
        <field name="name">Ready for Delivery</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'ready_delivery')]</field>
    </record>

    <!-- 10. Ready for Billing -->
    <record id="action_adp_ready_billing" model="ir.actions.act_window">
        <field name="name">Ready for Billing</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'ready_bill')]</field>
    </record>

    <!-- 10. Billed to ADP -->
    <record id="action_adp_billed" model="ir.actions.act_window">
        <field name="name">Billed to ADP</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'billed')]</field>
    </record>

    <!-- 11. Case Closed -->
    <record id="action_adp_closed" model="ir.actions.act_window">
        <field name="name">Case Closed</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'case_closed')]</field>
    </record>

    <!-- ===================================================================== -->
    <!-- SPECIAL STATUS ACTIONS -->
    <!-- ===================================================================== -->

    <!-- On Hold -->
    <record id="action_adp_on_hold" model="ir.actions.act_window">
        <field name="name">On Hold</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'on_hold')]</field>
    </record>

    <!-- Withdrawn -->
    <record id="action_adp_withdrawn" model="ir.actions.act_window">
        <field name="name">Withdrawn</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'withdrawn')]</field>
    </record>

    <!-- Denied -->
    <record id="action_adp_denied" model="ir.actions.act_window">
        <field name="name">Denied</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'denied')]</field>
    </record>

    <!-- Cancelled -->
    <record id="action_adp_cancelled" model="ir.actions.act_window">
        <field name="name">Cancelled</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'cancelled')]</field>
    </record>

    <!-- Expired -->
    <record id="action_adp_expired" model="ir.actions.act_window">
        <field name="name">Expired</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_is_adp_sale', '=', True), ('x_fc_adp_application_status', '=', 'expired')]</field>
    </record>

    <!-- ADP Invoices -->
    <record id="action_adp_invoices" model="ir.actions.act_window">
        <field name="name">ADP Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', 'in', ['adp', 'adp_odsp']), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <!-- ===================================================================== -->
    <!-- PER-TYPE ACTIONS (non-ADP funding types)                              -->
    <!-- ===================================================================== -->

    <record id="action_fc_acsd_orders" model="ir.actions.act_window">
        <field name="name">ACSD Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_client_type', '=', 'ACS')]</field>
        <field name="context">{'default_x_fc_client_type': 'ACS', 'default_x_fc_sale_type': 'adp'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No ACSD cases yet</p></field>
    </record>

    <!-- ===================================================================== -->
    <!-- ODSP: LIST VIEW                                                     -->
    <!-- ===================================================================== -->
    <record id="view_sale_order_list_odsp" model="ir.ui.view">
        <field name="name">sale.order.list.odsp</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <list string="ODSP Cases" default_order="date_order desc, id desc">
                <!-- Always visible -->
                <field name="name" string="Order"/>
                <field name="date_order" string="Date" optional="show"/>
                <field name="partner_id" string="Client"/>
                <field name="x_fc_odsp_member_id" string="Member ID" optional="show"/>
                <field name="x_fc_odsp_division" optional="show"/>

                <!-- Division-specific status columns -->
                <field name="x_fc_odsp_std_status" widget="badge" string="ODSP Status"
                       decoration-info="x_fc_odsp_std_status in ('quotation','submitted_to_odsp')"
                       decoration-warning="x_fc_odsp_std_status in ('pre_approved','on_hold')"
                       decoration-success="x_fc_odsp_std_status in ('ready_delivery','delivered','pod_submitted','payment_received','case_closed')"
                       decoration-danger="x_fc_odsp_std_status in ('denied','cancelled')"
                       optional="show"/>
                <field name="x_fc_sa_status" widget="badge" string="SA Status"
                       decoration-info="x_fc_sa_status in ('quotation','form_ready','submitted_to_sa')"
                       decoration-warning="x_fc_sa_status in ('pre_approved','on_hold')"
                       decoration-success="x_fc_sa_status in ('ready_delivery','delivered','pod_submitted','payment_received','case_closed')"
                       decoration-danger="x_fc_sa_status in ('denied','cancelled')"
                       optional="hide"/>
                <field name="x_fc_ow_status" widget="badge" string="OW Status"
                       decoration-info="x_fc_ow_status in ('quotation','documents_ready','submitted_to_ow')"
                       decoration-warning="x_fc_ow_status in ('on_hold')"
                       decoration-success="x_fc_ow_status in ('payment_received','ready_delivery','delivered','case_closed')"
                       decoration-danger="x_fc_ow_status in ('denied','cancelled')"
                       optional="hide"/>

                <!-- ODSP contacts -->
                <field name="x_fc_odsp_office_id" optional="show"/>
                <field name="x_fc_odsp_case_worker_name" optional="show"/>
                <field name="user_id" string="Sales Rep" optional="hide"/>
                <field name="x_fc_authorizer_id" optional="hide"/>

                <!-- Amounts -->
                <field name="amount_total" widget="monetary" sum="Grand Total" optional="show"/>

                <!-- Misc -->
                <field name="x_fc_on_hold_date" optional="hide"/>
                <field name="x_fc_case_locked" optional="hide"/>
                <field name="state" widget="badge" decoration-success="state == 'sale'"
                       decoration-info="state == 'draft'" optional="hide"/>
            </list>
        </field>
    </record>

    <!-- ===================================================================== -->
    <!-- ODSP: SEARCH VIEW                                                   -->
    <!-- ===================================================================== -->
    <record id="view_sale_order_search_odsp" model="ir.ui.view">
        <field name="name">sale.order.search.odsp</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <search string="Search ODSP Cases">
                <field name="name" string="Order"
                    filter_domain="['|', '|', ('name', 'ilike', self), ('client_order_ref', 'ilike', self), ('partner_id', 'child_of', self)]"/>
                <field name="partner_id"/>
                <field name="x_fc_odsp_member_id"/>
                <field name="x_fc_odsp_office_id"/>
                <field name="x_fc_odsp_case_worker_name"/>
                <separator/>
                <!-- ODSP Standard Status -->
                <filter string="Quotation" name="filter_quotation"
                        domain="[('x_fc_odsp_std_status', '=', 'quotation')]"/>
                <filter string="Submitted to ODSP" name="filter_submitted_odsp"
                        domain="[('x_fc_odsp_std_status', '=', 'submitted_to_odsp')]"/>
                <filter string="Pre-Approved" name="filter_pre_approved"
                        domain="[('x_fc_odsp_std_status', '=', 'pre_approved')]"/>
                <filter string="Ready for Delivery" name="filter_ready_delivery"
                        domain="[('x_fc_odsp_std_status', '=', 'ready_delivery')]"/>
                <filter string="Delivered" name="filter_delivered"
                        domain="[('x_fc_odsp_std_status', '=', 'delivered')]"/>
                <filter string="POD Submitted" name="filter_pod_submitted"
                        domain="[('x_fc_odsp_std_status', '=', 'pod_submitted')]"/>
                <filter string="Payment Received" name="filter_payment_received"
                        domain="[('x_fc_odsp_std_status', '=', 'payment_received')]"/>
                <filter string="Case Closed" name="filter_case_closed"
                        domain="[('x_fc_odsp_std_status', '=', 'case_closed')]"/>
                <separator/>
                <!-- Special Status -->
                <filter string="On Hold" name="filter_on_hold"
                        domain="[('x_fc_odsp_std_status', '=', 'on_hold')]"/>
                <filter string="Denied" name="filter_denied"
                        domain="[('x_fc_odsp_std_status', '=', 'denied')]"/>
                <filter string="Cancelled" name="filter_cancelled"
                        domain="[('x_fc_odsp_std_status', '=', 'cancelled')]"/>
                <separator/>
                <!-- Division Filters -->
                <filter string="ODSP Standard" name="filter_division_standard"
                        domain="[('x_fc_odsp_division', '=', 'standard')]"/>
                <filter string="SA Mobility" name="filter_division_sa"
                        domain="[('x_fc_odsp_division', '=', 'sa_mobility')]"/>
                <filter string="Ontario Works" name="filter_division_ow"
                        domain="[('x_fc_odsp_division', '=', 'ontario_works')]"/>
                <separator/>
                <!-- Group By -->
                <filter string="ODSP Division" name="group_division" context="{'group_by': 'x_fc_odsp_division'}"/>
                <filter string="ODSP Status" name="group_odsp_status" context="{'group_by': 'x_fc_odsp_std_status'}"/>
                <filter string="SA Status" name="group_sa_status" context="{'group_by': 'x_fc_sa_status'}"/>
                <filter string="OW Status" name="group_ow_status" context="{'group_by': 'x_fc_ow_status'}"/>
                <filter string="ODSP Office" name="group_odsp_office" context="{'group_by': 'x_fc_odsp_office_id'}"/>
                <filter string="Salesperson" name="group_salesperson" context="{'group_by': 'user_id'}"/>
                <filter string="Create Month" name="group_create_month" context="{'group_by': 'create_date:month'}"/>
                <filter string="Create Quarter" name="group_create_quarter" context="{'group_by': 'create_date:quarter'}"/>
                <filter string="Create Year" name="group_create_year" context="{'group_by': 'create_date:year'}"/>
            </search>
        </field>
    </record>

    <!-- ===================================================================== -->
    <!-- ODSP: ACTIONS                                                       -->
    <!-- ===================================================================== -->
    <record id="action_fc_odsp_orders" model="ir.actions.act_window">
        <field name="name">All ODSP Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp'])]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No ODSP cases yet</p></field>
    </record>

    <record id="action_fc_odsp_standard_orders" model="ir.actions.act_window">
        <field name="name">ODSP Standard Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No ODSP Standard cases yet</p></field>
    </record>

    <record id="action_fc_odsp_sa_mobility_orders" model="ir.actions.act_window">
        <field name="name">SA Mobility Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No SA Mobility cases yet</p></field>
    </record>

    <record id="action_fc_odsp_ontario_works_orders" model="ir.actions.act_window">
        <field name="name">Ontario Works Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No Ontario Works cases yet</p></field>
    </record>

    <!-- ===================================================================== -->
    <!-- ODSP STANDARD: PER-STATUS ACTIONS                                    -->
    <!-- ===================================================================== -->
    <record id="action_odsp_std_quotation" model="ir.actions.act_window">
        <field name="name">Quotation</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'quotation')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_submitted" model="ir.actions.act_window">
        <field name="name">Submitted to ODSP</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'submitted_to_odsp')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_pre_approved" model="ir.actions.act_window">
        <field name="name">Pre-Approved</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'pre_approved')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_ready_delivery" model="ir.actions.act_window">
        <field name="name">Ready for Delivery</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'ready_delivery')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_delivered" model="ir.actions.act_window">
        <field name="name">Delivered</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'delivered')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_pod_submitted" model="ir.actions.act_window">
        <field name="name">POD Submitted</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'pod_submitted')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_payment_received" model="ir.actions.act_window">
        <field name="name">Payment Received</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'payment_received')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_case_closed" model="ir.actions.act_window">
        <field name="name">Case Closed</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'case_closed')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_on_hold" model="ir.actions.act_window">
        <field name="name">On Hold</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'on_hold')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_denied" model="ir.actions.act_window">
        <field name="name">Denied</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'denied')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>
    <record id="action_odsp_std_cancelled" model="ir.actions.act_window">
        <field name="name">Cancelled</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'standard'), ('x_fc_odsp_std_status', '=', 'cancelled')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'standard'}</field>
    </record>

    <!-- ===================================================================== -->
    <!-- SA MOBILITY: PER-STATUS ACTIONS                                      -->
    <!-- ===================================================================== -->
    <record id="action_odsp_sa_quotation" model="ir.actions.act_window">
        <field name="name">Quotation</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'quotation')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_form_ready" model="ir.actions.act_window">
        <field name="name">SA Form Ready</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'form_ready')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_submitted" model="ir.actions.act_window">
        <field name="name">Submitted to SA Mobility</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'submitted_to_sa')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_pre_approved" model="ir.actions.act_window">
        <field name="name">Pre-Approved</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'pre_approved')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_ready_delivery" model="ir.actions.act_window">
        <field name="name">Ready for Delivery</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'ready_delivery')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_delivered" model="ir.actions.act_window">
        <field name="name">Delivered</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'delivered')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_pod_submitted" model="ir.actions.act_window">
        <field name="name">POD Submitted</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'pod_submitted')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_payment_received" model="ir.actions.act_window">
        <field name="name">Payment Received</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'payment_received')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_case_closed" model="ir.actions.act_window">
        <field name="name">Case Closed</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'case_closed')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_on_hold" model="ir.actions.act_window">
        <field name="name">On Hold</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'on_hold')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_denied" model="ir.actions.act_window">
        <field name="name">Denied</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'denied')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>
    <record id="action_odsp_sa_cancelled" model="ir.actions.act_window">
        <field name="name">Cancelled</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'sa_mobility'), ('x_fc_sa_status', '=', 'cancelled')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'sa_mobility'}</field>
    </record>

    <!-- ===================================================================== -->
    <!-- ONTARIO WORKS: PER-STATUS ACTIONS                                    -->
    <!-- ===================================================================== -->
    <record id="action_odsp_ow_quotation" model="ir.actions.act_window">
        <field name="name">Quotation</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'quotation')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_documents_ready" model="ir.actions.act_window">
        <field name="name">Documents Ready</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'documents_ready')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_submitted" model="ir.actions.act_window">
        <field name="name">Submitted to Ontario Works</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'submitted_to_ow')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_payment_received" model="ir.actions.act_window">
        <field name="name">Payment Received</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'payment_received')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_ready_delivery" model="ir.actions.act_window">
        <field name="name">Ready for Delivery</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'ready_delivery')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_delivered" model="ir.actions.act_window">
        <field name="name">Delivered</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'delivered')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_case_closed" model="ir.actions.act_window">
        <field name="name">Case Closed</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'case_closed')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_on_hold" model="ir.actions.act_window">
        <field name="name">On Hold</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'on_hold')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_denied" model="ir.actions.act_window">
        <field name="name">Denied</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'denied')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>
    <record id="action_odsp_ow_cancelled" model="ir.actions.act_window">
        <field name="name">Cancelled</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_odsp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_odsp"/>
        <field name="domain">[('x_fc_sale_type', 'in', ['odsp', 'adp_odsp']), ('x_fc_odsp_division', '=', 'ontario_works'), ('x_fc_ow_status', '=', 'cancelled')]</field>
        <field name="context">{'default_x_fc_sale_type': 'odsp', 'default_x_fc_odsp_division': 'ontario_works'}</field>
    </record>

    <!-- ===================================================================== -->
    <!-- MARCH OF DIMES: KANBAN VIEW                                         -->
    <!-- ===================================================================== -->
    <record id="view_sale_order_kanban_mod" model="ir.ui.view">
        <field name="name">sale.order.kanban.mod</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <kanban class="o_kanban_mobile" default_group_by="x_fc_mod_status"
                    group_create="0" group_delete="0" group_edit="0"
                    records_draggable="0">
                <field name="name"/>
                <field name="partner_id"/>
                <field name="amount_total"/>
                <field name="x_fc_mod_status"/>
                <field name="x_fc_case_reference"/>
                <field name="x_fc_mod_product_type"/>
                <field name="x_fc_mod_approved_amount"/>
                <field name="date_order"/>
                <field name="currency_id"/>
                <templates>
                    <t t-name="card">
                        <div class="row">
                            <div class="col-8">
                                <strong><field name="name"/></strong>
                            </div>
                            <div class="col-4 text-end">
                                <field name="x_fc_mod_status" widget="badge"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12">
                                <field name="partner_id"/>
                            </div>
                        </div>
                        <div class="row mt-2">
                            <div class="col-6">
                                <small class="text-muted">HVMP Ref:</small><br/>
                                <field name="x_fc_case_reference"/>
                            </div>
                            <div class="col-6 text-end">
                                <small class="text-muted">Product:</small><br/>
                                <field name="x_fc_mod_product_type"/>
                            </div>
                        </div>
                        <div class="row mt-2">
                            <div class="col-6">
                                <small class="text-muted">MOD Approved:</small><br/>
                                <field name="x_fc_mod_approved_amount" widget="monetary"/>
                            </div>
                            <div class="col-6 text-end">
                                <strong>Total: <field name="amount_total" widget="monetary"/></strong>
                            </div>
                        </div>
                    </t>
                </templates>
            </kanban>
        </field>
    </record>

    <!-- ===================================================================== -->
    <!-- MARCH OF DIMES: LIST VIEW                                            -->
    <!-- ===================================================================== -->
    <record id="view_sale_order_list_mod" model="ir.ui.view">
        <field name="name">sale.order.list.mod</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <list string="March of Dimes Cases" default_order="date_order desc, id desc">
                <!-- Always visible -->
                <field name="name" string="Order"/>
                <field name="date_order" string="Date" optional="show"/>
                <field name="partner_id" string="Client"/>
                <field name="x_fc_case_reference" string="HVMP Ref" optional="show"/>
                <field name="x_fc_mod_status" widget="badge"
                       decoration-info="x_fc_mod_status in ('need_to_schedule','assessment_scheduled','assessment_completed','processing_drawings')"
                       decoration-warning="x_fc_mod_status in ('quote_submitted','awaiting_funding','on_hold')"
                       decoration-success="x_fc_mod_status in ('funding_approved','contract_received','in_production','project_complete','pod_submitted','case_closed')"
                       decoration-danger="x_fc_mod_status in ('funding_denied','cancelled')"
                       optional="show"/>
                <field name="x_fc_mod_product_type" optional="show"/>

                <!-- Contacts / Sales -->
                <field name="x_fc_case_handler" optional="show"/>
                <field name="x_fc_case_worker" optional="show"/>
                <field name="user_id" string="Sales Rep" optional="hide"/>

                <!-- Key dates -->
                <field name="x_fc_mod_assessment_scheduled_date" string="Assess. Scheduled" optional="hide"/>
                <field name="x_fc_mod_assessment_completed_date" string="Assess. Done" optional="hide"/>
                <field name="x_fc_mod_drawing_submitted_date" string="Drawing Sent" optional="hide"/>
                <field name="x_fc_mod_application_submitted_date" string="App. Submitted" optional="hide"/>
                <field name="x_fc_case_approved" string="Funding Approved" optional="hide"/>
                <field name="x_fc_mod_pca_received_date" string="PCA Received" optional="hide"/>
                <field name="x_fc_mod_production_started_date" string="Production Start" optional="hide"/>
                <field name="x_fc_mod_project_completed_date" string="Project Done" optional="hide"/>
                <field name="x_fc_mod_pod_submitted_date" string="POD Sent" optional="hide"/>
                <field name="x_fc_mod_case_closed_date" string="Closed" optional="hide"/>

                <!-- Amounts -->
                <field name="x_fc_mod_approved_amount" widget="monetary" string="MOD Approved" optional="hide"/>
                <field name="amount_total" widget="monetary" sum="Grand Total" optional="show"/>

                <!-- Misc -->
                <field name="state" widget="badge" decoration-success="state == 'sale'"
                       decoration-info="state == 'draft'" optional="hide"/>
            </list>
        </field>
    </record>

    <!-- ===================================================================== -->
    <!-- MARCH OF DIMES: SEARCH VIEW                                          -->
    <!-- ===================================================================== -->
    <record id="view_sale_order_search_mod" model="ir.ui.view">
        <field name="name">sale.order.search.mod</field>
        <field name="model">sale.order</field>
        <field name="arch" type="xml">
            <search string="Search March of Dimes Cases">
                <field name="name" string="Order"
                    filter_domain="['|', '|', ('name', 'ilike', self), ('client_order_ref', 'ilike', self), ('partner_id', 'child_of', self)]"/>
                <field name="partner_id"/>
                <field name="x_fc_case_reference"/>
                <field name="x_fc_case_handler"/>
                <separator/>
                <!-- Status Filters - Main Workflow -->
                <filter string="Schedule Assessment" name="filter_need_to_schedule"
                        domain="[('x_fc_mod_status', '=', 'need_to_schedule')]"/>
                <filter string="Assessment Booked" name="filter_assessment_scheduled"
                        domain="[('x_fc_mod_status', '=', 'assessment_scheduled')]"/>
                <filter string="Assessment Done" name="filter_assessment_completed"
                        domain="[('x_fc_mod_status', '=', 'assessment_completed')]"/>
                <filter string="Processing Drawing" name="filter_processing_drawings"
                        domain="[('x_fc_mod_status', '=', 'processing_drawings')]"/>
                <filter string="Quote Sent" name="filter_quote_submitted"
                        domain="[('x_fc_mod_status', '=', 'quote_submitted')]"/>
                <filter string="Awaiting Funding" name="filter_awaiting_funding"
                        domain="[('x_fc_mod_status', '=', 'awaiting_funding')]"/>
                <filter string="Approved" name="filter_funding_approved"
                        domain="[('x_fc_mod_status', '=', 'funding_approved')]"/>
                <filter string="PCA Received" name="filter_contract_received"
                        domain="[('x_fc_mod_status', '=', 'contract_received')]"/>
                <filter string="In Production" name="filter_in_production"
                        domain="[('x_fc_mod_status', '=', 'in_production')]"/>
                <filter string="Complete" name="filter_project_complete"
                        domain="[('x_fc_mod_status', '=', 'project_complete')]"/>
                <filter string="POD Sent" name="filter_pod_submitted"
                        domain="[('x_fc_mod_status', '=', 'pod_submitted')]"/>
                <filter string="Closed" name="filter_case_closed"
                        domain="[('x_fc_mod_status', '=', 'case_closed')]"/>
                <separator/>
                <!-- Special Status Filters -->
                <filter string="Denied" name="filter_funding_denied"
                        domain="[('x_fc_mod_status', '=', 'funding_denied')]"/>
                <filter string="On Hold" name="filter_on_hold"
                        domain="[('x_fc_mod_status', '=', 'on_hold')]"/>
                <filter string="Cancelled" name="filter_cancelled"
                        domain="[('x_fc_mod_status', '=', 'cancelled')]"/>
                <separator/>
                <!-- Group By -->
                <filter string="MOD Status" name="group_mod_status" context="{'group_by': 'x_fc_mod_status'}"/>
                <filter string="Product Type" name="group_product_type" context="{'group_by': 'x_fc_mod_product_type'}"/>
                <filter string="Case Handler" name="group_case_handler" context="{'group_by': 'x_fc_case_handler'}"/>
                <filter string="Case Worker" name="group_case_worker" context="{'group_by': 'x_fc_case_worker'}"/>
                <filter string="Salesperson" name="group_salesperson" context="{'group_by': 'user_id'}"/>
                <filter string="Create Month" name="group_create_month" context="{'group_by': 'create_date:month'}"/>
                <filter string="Create Quarter" name="group_create_quarter" context="{'group_by': 'create_date:quarter'}"/>
                <filter string="Create Year" name="group_create_year" context="{'group_by': 'create_date:year'}"/>
            </search>
        </field>
    </record>

    <!-- ===================================================================== -->
    <!-- MARCH OF DIMES: ACTIONS                                              -->
    <!-- ===================================================================== -->
    <record id="action_fc_march_of_dimes_orders" model="ir.actions.act_window">
        <field name="name">All MOD Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No MOD cases yet</p></field>
    </record>

    <record id="action_mod_schedule_assessment" model="ir.actions.act_window">
        <field name="name">Schedule Assessment</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'need_to_schedule')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_assessment_booked" model="ir.actions.act_window">
        <field name="name">Assessment Booked</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'assessment_scheduled')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_assessment_done" model="ir.actions.act_window">
        <field name="name">Assessment Done</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'assessment_completed')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_processing_drawing" model="ir.actions.act_window">
        <field name="name">Processing Drawing</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'processing_drawings')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_quote_sent" model="ir.actions.act_window">
        <field name="name">Quote Sent</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'quote_submitted')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_awaiting_funding" model="ir.actions.act_window">
        <field name="name">Awaiting Funding</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'awaiting_funding')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_approved" model="ir.actions.act_window">
        <field name="name">Approved</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'funding_approved')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_pca_received" model="ir.actions.act_window">
        <field name="name">PCA Received</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'contract_received')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_in_production" model="ir.actions.act_window">
        <field name="name">In Production</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'in_production')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_complete" model="ir.actions.act_window">
        <field name="name">Complete</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'project_complete')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_pod_sent" model="ir.actions.act_window">
        <field name="name">POD Sent</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'pod_submitted')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_closed" model="ir.actions.act_window">
        <field name="name">Closed</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'case_closed')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <!-- MOD Special Status Actions -->
    <record id="action_mod_on_hold" model="ir.actions.act_window">
        <field name="name">On Hold</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'on_hold')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_denied" model="ir.actions.act_window">
        <field name="name">Denied</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'funding_denied')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_mod_cancelled" model="ir.actions.act_window">
        <field name="name">Cancelled</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_mod')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_mod')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_mod"/>
        <field name="domain">[('x_fc_sale_type', '=', 'march_of_dimes'), ('x_fc_mod_status', '=', 'cancelled')]</field>
        <field name="context">{'default_x_fc_sale_type': 'march_of_dimes'}</field>
    </record>

    <record id="action_fc_muscular_dystrophy_orders" model="ir.actions.act_window">
        <field name="name">Muscular Dystrophy Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_sale_type', '=', 'muscular_dystrophy')]</field>
        <field name="context">{'default_x_fc_sale_type': 'muscular_dystrophy'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No Muscular Dystrophy cases yet</p></field>
    </record>

    <record id="action_fc_insurance_orders" model="ir.actions.act_window">
        <field name="name">Insurance Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_sale_type', '=', 'insurance')]</field>
        <field name="context">{'default_x_fc_sale_type': 'insurance'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No Insurance cases yet</p></field>
    </record>

    <record id="action_fc_wsib_orders" model="ir.actions.act_window">
        <field name="name">WSIB Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_sale_type', '=', 'wsib')]</field>
        <field name="context">{'default_x_fc_sale_type': 'wsib'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No WSIB cases yet</p></field>
    </record>

    <record id="action_fc_hardship_orders" model="ir.actions.act_window">
        <field name="name">Hardship Funding Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_sale_type', '=', 'hardship')]</field>
        <field name="context">{'default_x_fc_sale_type': 'hardship'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No Hardship Funding cases yet</p></field>
    </record>

    <record id="action_fc_rental_orders" model="ir.actions.act_window">
        <field name="name">Rental Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_sale_type', '=', 'rental')]</field>
        <field name="context">{'default_x_fc_sale_type': 'rental'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No Rental cases yet</p></field>
    </record>

    <record id="action_fc_direct_private_orders" model="ir.actions.act_window">
        <field name="name">Direct/Private Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_sale_type', '=', 'direct_private')]</field>
        <field name="context">{'default_x_fc_sale_type': 'direct_private'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No Direct/Private cases yet</p></field>
    </record>

    <record id="action_fc_other_orders" model="ir.actions.act_window">
        <field name="name">Other Cases</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_sale_type', '=', 'other')]</field>
        <field name="context">{'default_x_fc_sale_type': 'other'}</field>
        <field name="help" type="html"><p class="o_view_nocontent_smiling_face">No other cases yet</p></field>
    </record>

    <!-- All Orders (all sale types) -->
    <record id="action_fc_all_orders" model="ir.actions.act_window">
        <field name="name">All Orders</field>
        <field name="res_model">sale.order</field>
        <field name="view_mode">list,form,kanban</field>
        <field name="view_ids" eval="[(5, 0, 0),
            (0, 0, {'view_mode': 'list', 'view_id': ref('view_sale_order_list_adp')}),
            (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_sale_order_kanban_adp')})]"/>
        <field name="search_view_id" ref="view_sale_order_search_adp"/>
        <field name="domain">[('x_fc_sale_type', '!=', False)]</field>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">Create your first order</p>
        </field>
    </record>

    <!-- All Invoices (all sale types) -->
    <record id="action_fc_all_invoices" model="ir.actions.act_window">
        <field name="name">All Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '!=', False), ('x_fc_invoice_type', '!=', 'regular'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <!-- ===================================================================== -->
    <!-- INVOICE ACTIONS PER FUNDING SOURCE                                    -->
    <!-- ===================================================================== -->

    <record id="action_adp_client_invoices" model="ir.actions.act_window">
        <field name="name">ADP Client Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'adp_client'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_odsp_invoices" model="ir.actions.act_window">
        <field name="name">ODSP Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', 'in', ['odsp', 'adp_odsp']), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_mod_invoices" model="ir.actions.act_window">
        <field name="name">MOD Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'march_of_dimes'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_wsib_invoices" model="ir.actions.act_window">
        <field name="name">WSIB Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'wsib'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_insurance_invoices" model="ir.actions.act_window">
        <field name="name">Insurance Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'insurance'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_direct_private_invoices" model="ir.actions.act_window">
        <field name="name">Direct/Private Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'direct_private'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_hardship_invoices" model="ir.actions.act_window">
        <field name="name">Hardship Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'hardship'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_rental_invoices" model="ir.actions.act_window">
        <field name="name">Rental Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'rental'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_muscular_dystrophy_invoices" model="ir.actions.act_window">
        <field name="name">Muscular Dystrophy Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'muscular_dystrophy'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <record id="action_other_invoices" model="ir.actions.act_window">
        <field name="name">Other Invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,form</field>
        <field name="domain">[('x_fc_invoice_type', '=', 'other'), ('move_type', 'in', ['out_invoice', 'out_refund'])]</field>
        <field name="context">{'default_move_type': 'out_invoice'}</field>
    </record>

    <!-- Open AI Agent Chat -->
    <record id="action_fc_open_ai_chat" model="ir.actions.server">
        <field name="name">Ask Fusion Claims AI</field>
        <field name="model_id" ref="model_sale_order"/>
        <field name="state">code</field>
        <field name="code">
agent = env.ref('fusion_claims.ai_agent_fusion_claims', raise_if_not_found=False)
if agent:
    action = agent.open_agent_chat()
else:
    action = {'type': 'ir.actions.act_window', 'res_model': 'res.config.settings', 'view_mode': 'form', 'target': 'current', 'context': {'module': 'fusion_claims'}}
        </field>
    </record>

    <!-- Settings Action -->
    <record id="action_fusion_claims_settings" model="ir.actions.act_window">
        <field name="name">Settings</field>
        <field name="res_model">res.config.settings</field>
        <field name="view_mode">form</field>
        <field name="target">current</field>
        <field name="context">{'module': 'fusion_claims'}</field>
    </record>

    <!-- ===================================================================== -->
    <!-- FUSION CLAIMS MENU STRUCTURE (STANDALONE)                             -->
    <!-- ===================================================================== -->

    <!-- TOP-LEVEL APP MENU (no parent = standalone) -->
    <menuitem id="menu_adp_claims_root" 
              name="Fusion Claims" 
              web_icon="fusion_claims,static/description/icon.png"
              sequence="30"
              groups="group_fusion_claims_user,fusion_tasks.group_field_technician"/>

    <!-- ===== ALL ORDERS (parent) ===== -->
    <menuitem id="menu_fc_all_orders" name="All Orders" parent="menu_adp_claims_root"
              action="sale.action_orders" sequence="2"/>
    <menuitem id="menu_fc_all_sales_orders" name="All Sales Orders" parent="menu_fc_all_orders"
              action="sale.action_orders" sequence="1"/>
    <menuitem id="menu_fc_all_invoices" name="All Invoices" parent="menu_fc_all_orders"
              action="action_fc_all_invoices" sequence="2"/>

    <!-- ===== ADP SUBMENU (full workflow) ===== -->
    <menuitem id="menu_fc_adp"
              name="ADP"
              parent="menu_adp_claims_root"
              sequence="20"/>

    <!-- Top-level quick access -->
    <menuitem id="menu_adp_all_orders" name="All ADP Orders" parent="menu_fc_adp"
              action="action_adp_orders_all" sequence="1"/>

    <!-- Orders & Billing -->
    <menuitem id="menu_adp_orders_billing"
              name="Orders &amp; Billing"
              parent="menu_fc_adp"
              sequence="5"/>
    <menuitem id="menu_adp_invoices" name="ADP Invoices" parent="menu_adp_orders_billing"
              action="action_adp_invoices" sequence="1"/>
    <menuitem id="menu_adp_client_invoices" name="Client Invoices" parent="menu_adp_orders_billing"
              action="action_adp_client_invoices" sequence="2"/>
    <menuitem id="menu_adp_ready_billing" name="Ready for Billing" parent="menu_adp_orders_billing"
              action="action_adp_ready_billing" sequence="3"/>
    <menuitem id="menu_adp_billed" name="Billed to ADP" parent="menu_adp_orders_billing"
              action="action_adp_billed" sequence="4"/>
    <menuitem id="menu_adp_export_files" name="Claim Submission Files" parent="menu_adp_orders_billing"
              action="action_adp_export_records" sequence="5"/>

    <!-- Pre-Submission Pipeline -->
    <menuitem id="menu_adp_pre_submission"
              name="Pre-Submission"
              parent="menu_fc_adp"
              sequence="10"/>
    <menuitem id="menu_adp_quotations" name="Quotation Stage" parent="menu_adp_pre_submission"
              action="action_adp_quotations" sequence="1"/>
    <menuitem id="menu_adp_assessment_scheduled" name="Assessment Scheduled" parent="menu_adp_pre_submission"
              action="action_adp_assessment_scheduled" sequence="2"/>
    <menuitem id="menu_adp_assessment_completed" name="Waiting for Application" parent="menu_adp_pre_submission"
              action="action_adp_assessment_completed" sequence="3"/>
    <menuitem id="menu_adp_application_received" name="Application Received" parent="menu_adp_pre_submission"
              action="action_adp_application_received" sequence="4"/>
    <menuitem id="menu_adp_ready_submission" name="Ready for Submission" parent="menu_adp_pre_submission"
              action="action_adp_ready_submission" sequence="5"/>

    <!-- ADP Review -->
    <menuitem id="menu_adp_review"
              name="ADP Review"
              parent="menu_fc_adp"
              sequence="20"/>
    <menuitem id="menu_adp_pending_approval" name="Application Submitted" parent="menu_adp_review"
              action="action_adp_pending_approval" sequence="1"/>
    <menuitem id="menu_adp_accepted" name="Accepted by ADP" parent="menu_adp_review"
              action="action_adp_accepted" sequence="2"/>
    <menuitem id="menu_adp_approved" name="Application Approved" parent="menu_adp_review"
              action="action_adp_approved" sequence="3"/>
    <menuitem id="menu_adp_rejected" name="Rejected by ADP" parent="menu_adp_review"
              action="action_adp_rejected" sequence="4"/>
    <menuitem id="menu_adp_needs_correction" name="Needs Correction" parent="menu_adp_review"
              action="action_adp_needs_correction" sequence="5"/>

    <!-- Fulfillment -->
    <menuitem id="menu_adp_fulfillment"
              name="Fulfillment"
              parent="menu_fc_adp"
              sequence="30"/>
    <menuitem id="menu_adp_ready_delivery" name="Ready for Delivery" parent="menu_adp_fulfillment"
              action="action_adp_ready_delivery" sequence="1"/>
    <menuitem id="menu_adp_closed" name="Case Closed" parent="menu_adp_fulfillment"
              action="action_adp_closed" sequence="2"/>

    <!-- Special Statuses -->
    <menuitem id="menu_adp_special_statuses"
              name="Special Statuses"
              parent="menu_fc_adp"
              sequence="50"/>
    <menuitem id="menu_adp_on_hold" name="On Hold" parent="menu_adp_special_statuses"
              action="action_adp_on_hold" sequence="10"/>
    <menuitem id="menu_adp_withdrawn" name="Withdrawn" parent="menu_adp_special_statuses"
              action="action_adp_withdrawn" sequence="20"/>
    <menuitem id="menu_adp_denied" name="Denied" parent="menu_adp_special_statuses"
              action="action_adp_denied" sequence="30"/>
    <menuitem id="menu_adp_cancelled" name="Cancelled" parent="menu_adp_special_statuses"
              action="action_adp_cancelled" sequence="40"/>
    <menuitem id="menu_adp_expired" name="Expired" parent="menu_adp_special_statuses"
              action="action_adp_expired" sequence="50"/>

    <!-- ===== FUNDING TYPE MENUS ===== -->
    <menuitem id="menu_fc_odsp" name="ODSP" parent="menu_adp_claims_root"
              sequence="25"/>
    <menuitem id="menu_fc_odsp_all" name="All ODSP Cases" parent="menu_fc_odsp"
              action="action_fc_odsp_orders" sequence="1"/>
    <menuitem id="menu_odsp_invoices" name="ODSP Invoices" parent="menu_fc_odsp"
              action="action_odsp_invoices" sequence="2"/>

    <!-- ===== ODSP Standard ===== -->
    <menuitem id="menu_fc_odsp_standard" name="ODSP Standard" parent="menu_fc_odsp"
              sequence="10"/>
    <menuitem id="menu_odsp_std_all" name="All Standard Cases" parent="menu_fc_odsp_standard"
              action="action_fc_odsp_standard_orders" sequence="1"/>
    <menuitem id="menu_odsp_std_quotation" name="Quotation" parent="menu_fc_odsp_standard"
              action="action_odsp_std_quotation" sequence="10"/>
    <menuitem id="menu_odsp_std_submitted" name="Submitted to ODSP" parent="menu_fc_odsp_standard"
              action="action_odsp_std_submitted" sequence="12"/>
    <menuitem id="menu_odsp_std_pre_approved" name="Pre-Approved" parent="menu_fc_odsp_standard"
              action="action_odsp_std_pre_approved" sequence="14"/>
    <menuitem id="menu_odsp_std_ready_delivery" name="Ready for Delivery" parent="menu_fc_odsp_standard"
              action="action_odsp_std_ready_delivery" sequence="16"/>
    <menuitem id="menu_odsp_std_delivered" name="Delivered" parent="menu_fc_odsp_standard"
              action="action_odsp_std_delivered" sequence="18"/>
    <menuitem id="menu_odsp_std_pod_submitted" name="POD Submitted" parent="menu_fc_odsp_standard"
              action="action_odsp_std_pod_submitted" sequence="20"/>
    <menuitem id="menu_odsp_std_payment_received" name="Payment Received" parent="menu_fc_odsp_standard"
              action="action_odsp_std_payment_received" sequence="22"/>
    <menuitem id="menu_odsp_std_case_closed" name="Case Closed" parent="menu_fc_odsp_standard"
              action="action_odsp_std_case_closed" sequence="24"/>
    <menuitem id="menu_odsp_std_special" name="Special Statuses" parent="menu_fc_odsp_standard"
              sequence="50"/>
    <menuitem id="menu_odsp_std_on_hold" name="On Hold" parent="menu_odsp_std_special"
              action="action_odsp_std_on_hold" sequence="10"/>
    <menuitem id="menu_odsp_std_denied" name="Denied" parent="menu_odsp_std_special"
              action="action_odsp_std_denied" sequence="20"/>
    <menuitem id="menu_odsp_std_cancelled" name="Cancelled" parent="menu_odsp_std_special"
              action="action_odsp_std_cancelled" sequence="30"/>

    <!-- ===== SA Mobility ===== -->
    <menuitem id="menu_fc_odsp_sa_mobility" name="SA Mobility" parent="menu_fc_odsp"
              sequence="20"/>
    <menuitem id="menu_odsp_sa_all" name="All SA Cases" parent="menu_fc_odsp_sa_mobility"
              action="action_fc_odsp_sa_mobility_orders" sequence="1"/>
    <menuitem id="menu_odsp_sa_quotation" name="Quotation" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_quotation" sequence="10"/>
    <menuitem id="menu_odsp_sa_form_ready" name="SA Form Ready" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_form_ready" sequence="12"/>
    <menuitem id="menu_odsp_sa_submitted" name="Submitted to SA" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_submitted" sequence="14"/>
    <menuitem id="menu_odsp_sa_pre_approved" name="Pre-Approved" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_pre_approved" sequence="16"/>
    <menuitem id="menu_odsp_sa_ready_delivery" name="Ready for Delivery" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_ready_delivery" sequence="18"/>
    <menuitem id="menu_odsp_sa_delivered" name="Delivered" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_delivered" sequence="20"/>
    <menuitem id="menu_odsp_sa_pod_submitted" name="POD Submitted" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_pod_submitted" sequence="22"/>
    <menuitem id="menu_odsp_sa_payment_received" name="Payment Received" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_payment_received" sequence="24"/>
    <menuitem id="menu_odsp_sa_case_closed" name="Case Closed" parent="menu_fc_odsp_sa_mobility"
              action="action_odsp_sa_case_closed" sequence="26"/>
    <menuitem id="menu_odsp_sa_special" name="Special Statuses" parent="menu_fc_odsp_sa_mobility"
              sequence="50"/>
    <menuitem id="menu_odsp_sa_on_hold" name="On Hold" parent="menu_odsp_sa_special"
              action="action_odsp_sa_on_hold" sequence="10"/>
    <menuitem id="menu_odsp_sa_denied" name="Denied" parent="menu_odsp_sa_special"
              action="action_odsp_sa_denied" sequence="20"/>
    <menuitem id="menu_odsp_sa_cancelled" name="Cancelled" parent="menu_odsp_sa_special"
              action="action_odsp_sa_cancelled" sequence="30"/>

    <!-- ===== Ontario Works ===== -->
    <menuitem id="menu_fc_odsp_ontario_works" name="Ontario Works" parent="menu_fc_odsp"
              sequence="30"/>
    <menuitem id="menu_odsp_ow_all" name="All OW Cases" parent="menu_fc_odsp_ontario_works"
              action="action_fc_odsp_ontario_works_orders" sequence="1"/>
    <menuitem id="menu_odsp_ow_quotation" name="Quotation" parent="menu_fc_odsp_ontario_works"
              action="action_odsp_ow_quotation" sequence="10"/>
    <menuitem id="menu_odsp_ow_documents_ready" name="Documents Ready" parent="menu_fc_odsp_ontario_works"
              action="action_odsp_ow_documents_ready" sequence="12"/>
    <menuitem id="menu_odsp_ow_submitted" name="Submitted to OW" parent="menu_fc_odsp_ontario_works"
              action="action_odsp_ow_submitted" sequence="14"/>
    <menuitem id="menu_odsp_ow_payment_received" name="Payment Received" parent="menu_fc_odsp_ontario_works"
              action="action_odsp_ow_payment_received" sequence="16"/>
    <menuitem id="menu_odsp_ow_ready_delivery" name="Ready for Delivery" parent="menu_fc_odsp_ontario_works"
              action="action_odsp_ow_ready_delivery" sequence="18"/>
    <menuitem id="menu_odsp_ow_delivered" name="Delivered" parent="menu_fc_odsp_ontario_works"
              action="action_odsp_ow_delivered" sequence="20"/>
    <menuitem id="menu_odsp_ow_case_closed" name="Case Closed" parent="menu_fc_odsp_ontario_works"
              action="action_odsp_ow_case_closed" sequence="22"/>
    <menuitem id="menu_odsp_ow_special" name="Special Statuses" parent="menu_fc_odsp_ontario_works"
              sequence="50"/>
    <menuitem id="menu_odsp_ow_on_hold" name="On Hold" parent="menu_odsp_ow_special"
              action="action_odsp_ow_on_hold" sequence="10"/>
    <menuitem id="menu_odsp_ow_denied" name="Denied" parent="menu_odsp_ow_special"
              action="action_odsp_ow_denied" sequence="20"/>
    <menuitem id="menu_odsp_ow_cancelled" name="Cancelled" parent="menu_odsp_ow_special"
              action="action_odsp_ow_cancelled" sequence="30"/>
    <menuitem id="menu_fc_march_of_dimes" name="MOD" parent="menu_adp_claims_root"
              sequence="30"/>
    <menuitem id="menu_mod_all_cases" name="All MOD Cases" parent="menu_fc_march_of_dimes"
              action="action_fc_march_of_dimes_orders" sequence="1"/>
    <menuitem id="menu_mod_invoices" name="MOD Invoices" parent="menu_fc_march_of_dimes"
              action="action_mod_invoices" sequence="2"/>
    <menuitem id="menu_mod_schedule_assessment" name="Schedule Assessment" parent="menu_fc_march_of_dimes"
              action="action_mod_schedule_assessment" sequence="10"/>
    <menuitem id="menu_mod_assessment_booked" name="Assessment Booked" parent="menu_fc_march_of_dimes"
              action="action_mod_assessment_booked" sequence="12"/>
    <menuitem id="menu_mod_assessment_done" name="Assessment Done" parent="menu_fc_march_of_dimes"
              action="action_mod_assessment_done" sequence="14"/>
    <menuitem id="menu_mod_processing_drawing" name="Processing Drawing" parent="menu_fc_march_of_dimes"
              action="action_mod_processing_drawing" sequence="16"/>
    <menuitem id="menu_mod_quote_sent" name="Quote Sent" parent="menu_fc_march_of_dimes"
              action="action_mod_quote_sent" sequence="18"/>
    <menuitem id="menu_mod_awaiting_funding" name="Awaiting Funding" parent="menu_fc_march_of_dimes"
              action="action_mod_awaiting_funding" sequence="20"/>
    <menuitem id="menu_mod_approved" name="Approved" parent="menu_fc_march_of_dimes"
              action="action_mod_approved" sequence="22"/>
    <menuitem id="menu_mod_pca_received" name="PCA Received" parent="menu_fc_march_of_dimes"
              action="action_mod_pca_received" sequence="24"/>
    <menuitem id="menu_mod_in_production" name="In Production" parent="menu_fc_march_of_dimes"
              action="action_mod_in_production" sequence="26"/>
    <menuitem id="menu_mod_complete" name="Complete" parent="menu_fc_march_of_dimes"
              action="action_mod_complete" sequence="28"/>
    <menuitem id="menu_mod_pod_sent" name="POD Sent" parent="menu_fc_march_of_dimes"
              action="action_mod_pod_sent" sequence="30"/>
    <menuitem id="menu_mod_closed" name="Closed" parent="menu_fc_march_of_dimes"
              action="action_mod_closed" sequence="32"/>

    <!-- MOD Special Statuses -->
    <menuitem id="menu_mod_special_statuses" name="Special Statuses" parent="menu_fc_march_of_dimes"
              sequence="50"/>
    <menuitem id="menu_mod_on_hold" name="On Hold" parent="menu_mod_special_statuses"
              action="action_mod_on_hold" sequence="10"/>
    <menuitem id="menu_mod_denied" name="Denied" parent="menu_mod_special_statuses"
              action="action_mod_denied" sequence="20"/>
    <menuitem id="menu_mod_cancelled" name="Cancelled" parent="menu_mod_special_statuses"
              action="action_mod_cancelled" sequence="30"/>

    <!-- ===== OTHER FUNDINGS SUBMENU ===== -->
    <menuitem id="menu_fc_other_fundings" name="Other Fundings" parent="menu_adp_claims_root"
              sequence="35"/>
    <menuitem id="menu_fc_hardship" name="Hardship Funding" parent="menu_fc_other_fundings"
              action="action_fc_hardship_orders" sequence="10"/>
    <menuitem id="menu_fc_acsd" name="ACSD" parent="menu_fc_other_fundings"
              action="action_fc_acsd_orders" sequence="20"/>
    <menuitem id="menu_fc_muscular_dystrophy" name="Muscular Dystrophy" parent="menu_fc_other_fundings"
              action="action_fc_muscular_dystrophy_orders" sequence="30"/>
    <menuitem id="menu_fc_insurance" name="Insurance" parent="menu_fc_other_fundings"
              action="action_fc_insurance_orders" sequence="40"/>
    <menuitem id="menu_fc_wsib" name="WSIB" parent="menu_fc_other_fundings"
              action="action_fc_wsib_orders" sequence="50"/>

    <!-- Invoices submenu under Other Fundings -->
    <menuitem id="menu_fc_other_invoices_sep" name="Invoices" parent="menu_fc_other_fundings"
              sequence="60"/>
    <menuitem id="menu_wsib_invoices" name="WSIB Invoices" parent="menu_fc_other_invoices_sep"
              action="action_wsib_invoices" sequence="10"/>
    <menuitem id="menu_insurance_invoices" name="Insurance Invoices" parent="menu_fc_other_invoices_sep"
              action="action_insurance_invoices" sequence="20"/>
    <menuitem id="menu_direct_private_invoices" name="Direct/Private Invoices" parent="menu_fc_other_invoices_sep"
              action="action_direct_private_invoices" sequence="30"/>
    <menuitem id="menu_hardship_invoices" name="Hardship Invoices" parent="menu_fc_other_invoices_sep"
              action="action_hardship_invoices" sequence="40"/>
    <menuitem id="menu_rental_invoices" name="Rental Invoices" parent="menu_fc_other_invoices_sep"
              action="action_rental_invoices" sequence="50"/>
    <menuitem id="menu_muscular_dystrophy_invoices" name="Muscular Dystrophy Invoices" parent="menu_fc_other_invoices_sep"
              action="action_muscular_dystrophy_invoices" sequence="60"/>
    <menuitem id="menu_other_type_invoices" name="Other Invoices" parent="menu_fc_other_invoices_sep"
              action="action_other_invoices" sequence="70"/>

    <!-- ===== CLIENT INTELLIGENCE ===== -->
    <menuitem id="menu_fc_client_intelligence"
              name="Client Intelligence"
              parent="menu_adp_claims_root"
              sequence="75"/>

    <menuitem id="menu_fc_client_profiles" name="Client Profiles" parent="menu_fc_client_intelligence"
              action="action_fusion_client_profiles" sequence="10"/>
    <menuitem id="menu_fc_client_chat" name="Ask AI" parent="menu_fc_client_intelligence"
              action="action_fc_open_ai_chat" sequence="20"/>

    <!-- ===== CONFIGURATION ===== -->
    <menuitem id="menu_adp_config" 
              name="Configuration" 
              parent="menu_adp_claims_root"
              sequence="100"
              groups="group_fusion_claims_manager"/>

    <menuitem id="menu_adp_device_codes" name="Device Codes" parent="menu_adp_config"
              action="action_fusion_adp_device_codes" sequence="10"/>
    <menuitem id="menu_import_device_codes" name="Import Device Codes" parent="menu_adp_config"
              action="action_device_import_wizard" sequence="20"/>
    <menuitem id="menu_import_xml_files" name="Import XML Files" parent="menu_adp_config"
              action="action_xml_import_wizard" sequence="30"/>
    <menuitem id="menu_adp_import_files" name="Import Submission Files" parent="menu_adp_config"
              action="action_adp_import_wizard" sequence="35"/>
    <menuitem id="menu_fusion_claims_settings" name="Settings" parent="menu_adp_config"
              action="action_fusion_claims_settings" sequence="90"/>

</odoo>

