<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <!-- ============================================================ -->
    <!--              LOAN IMPORT WIZARD - Form View                  -->
    <!-- ============================================================ -->
    <record id="fusion_loan_import_wizard_view_form" model="ir.ui.view">
        <field name="name">fusion.loan.import.wizard.form</field>
        <field name="model">fusion.loan.import.wizard</field>
        <field name="arch" type="xml">
            <form string="Import Loans from CSV">
                <group>
                    <group string="File">
                        <field name="csv_file" filename="csv_filename"/>
                        <field name="csv_filename" invisible="1"/>
                    </group>
                    <group string="Options">
                        <field name="auto_compute"/>
                    </group>
                </group>
                <separator string="Default Values"/>
                <group>
                    <group>
                        <field name="partner_id"/>
                        <field name="journal_id"/>
                        <field name="loan_account_id"/>
                        <field name="interest_account_id"/>
                    </group>
                    <group>
                        <field name="payment_frequency"/>
                        <field name="amortization_method"/>
                    </group>
                </group>
                <separator/>
                <div class="alert alert-info" role="alert">
                    <strong>Expected CSV format:</strong>
                    <code>name, principal, rate, term, start_date</code>
                    <br/>
                    Example row:
                    <code>Office Loan, 50000, 5.5, 60, 2026-01-15</code>
                </div>
                <footer>
                    <button name="action_import"
                            string="Import"
                            type="object"
                            class="btn-primary"/>
                    <button string="Cancel" special="cancel"/>
                </footer>
            </form>
        </field>
    </record>

</odoo>
