<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <record id="res_config_settings_view_form_fusion_pdf_preview" model="ir.ui.view">
        <field name="name">res.config.settings.view.form.fusion.pdf.preview</field>
        <field name="model">res.config.settings</field>
        <field name="inherit_id" ref="base.res_config_settings_view_form"/>
        <field name="arch" type="xml">
            <xpath expr="//form" position="inside">
                <app data-string="Fusion PDF Preview" string="Fusion PDF Preview" name="fusion_pdf_preview">
                    <h2>Default Settings</h2>
                    <div class="row mt-4 o_settings_container">
                        <div class="col-12 col-lg-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="fpv_default_preview_print"/>
                            </div>
                            <div class="o_setting_right_pane">
                                <label for="fpv_default_preview_print"/>
                                <div class="text-muted">
                                    Enable PDF preview in a dialog by default for new users.
                                </div>
                            </div>
                        </div>
                        <div class="col-12 col-lg-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="fpv_default_automatic_printing"/>
                            </div>
                            <div class="o_setting_right_pane">
                                <label for="fpv_default_automatic_printing"/>
                                <div class="text-muted">
                                    Enable automatic printing by default for new users.
                                </div>
                            </div>
                        </div>
                    </div>

                    <h2>Bulk Actions</h2>
                    <div class="row mt-4 o_settings_container">
                        <div class="col-12 col-lg-6 o_setting_box">
                            <div class="o_setting_right_pane">
                                <span class="o_form_label">Apply to All Users</span>
                                <div class="text-muted">
                                    Apply the above default settings to all current internal users in this company.
                                </div>
                                <div class="mt-2">
                                    <button name="action_fpv_apply_to_all_users"
                                            type="object"
                                            string="Apply to All Users"
                                            class="btn-primary"
                                            icon="fa-users"
                                            confirm="This will overwrite PDF preview preferences for all internal users in the current company. Continue?"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </app>
            </xpath>
        </field>
    </record>
</odoo>
