<?xml version="1.0"?>
<odoo>

            <act_window
                id="action_police_download"
                name="Action Police File Download"
                res_model="police.wizard"
                view_mode="form"
            />

            <record id="view_police_download" model="ir.ui.view">
                <field name="name">Police File Download</field>
                <field name="model">police.wizard</field>
                <field name="arch" type="xml">
                    <form>
                        <sheet>
                            <group string="Create Police File" colspan="1">
                                    <field name="download_date"/>
                                    <field name="download_num" style="max-width:3em"/>
                            </group>
                                <div>
                                    <button name="generate_file" class="oe_form_button_save btn btn-primary btn-sm" type="object" string="Generate Police file"/>
                                    <field name="txt_filename" invisible="1"/>
                                    <field name="txt_binary" filename="txt_filename" readonly="1" style="margin-left: 20px;"/>
                                </div>
                            <group colspan="1">
                                <div>
                                    <p><field name="log_police" readonly="1"/></p>
                                    <p><field name="txt_message" readonly="1"/><strong><field name="error_partner" readonly="1"/></strong></p>
                                </div>
                            </group>
                            <group>
                              <div>
                                <p>Abrir web de la Polícia para entregar el fichero generado: <a href="https://webpol.policia.es/e-hotel" target="_blank">Policia <i class="fa fa-flag"></i></a></p>
                                <p>Abrir web de la Guardia Civil para entregar el fichero generado: <a href="https://hospederias.guardiacivil.es" target="_blank">Guardia Civil <i class="fa fa-tree"></i></a></p>
                              </div>
                            </group>
                        </sheet>
                    </form>
                </field>
            </record>

            <menuitem
                id="menu_police_download"
                name="Police File Download"
                parent="hotel.hotel_reports_menu"
                sequence="36"
                action="action_police_download"
            />

</odoo>
