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

    <!-- Form View: Follow-up Send Wizard -->
    <record id="fusion_followup_send_wizard_view_form" model="ir.ui.view">
        <field name="name">fusion.followup.send.wizard.form</field>
        <field name="model">fusion.followup.send.wizard</field>
        <field name="arch" type="xml">
            <form string="Send Payment Follow-up">
                <group>
                    <group string="Partner Information">
                        <field name="partner_id"/>
                        <field name="followup_level_id"/>
                        <field name="overdue_amount" widget="monetary"/>
                        <field name="overdue_count"/>
                        <field name="currency_id" invisible="1"/>
                        <field name="followup_line_id" invisible="1"/>
                    </group>
                    <group string="Communication Channels">
                        <field name="do_send_email"/>
                        <field name="do_send_sms"/>
                        <field name="do_print_letter"/>
                        <field name="do_join_invoices" invisible="not do_send_email"/>
                    </group>
                </group>
                <separator string="Email Preview"/>
                <group invisible="not do_send_email">
                    <field name="email_subject"/>
                </group>
                <field name="email_body" invisible="not do_send_email"/>
                <footer>
                    <button name="action_send_followup" type="object"
                            string="Send" class="btn-primary"/>
                    <button string="Cancel" class="btn-secondary" special="cancel"/>
                </footer>
            </form>
        </field>
    </record>

    <!-- Action: Open Wizard -->
    <record id="action_fusion_followup_send_wizard" model="ir.actions.act_window">
        <field name="name">Preview &amp; Send Follow-up</field>
        <field name="res_model">fusion.followup.send.wizard</field>
        <field name="view_mode">form</field>
        <field name="target">new</field>
        <field name="binding_model_id" ref="fusion_accounting.model_fusion_followup_line"/>
    </record>

</odoo>
