<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record model="ir.ui.view" id="pms_log_institution_traveller_report_view_form">
        <field name="name">pms.log.institution.traveller.report.form</field>
        <field name="model">pms.log.institution.traveller.report</field>
        <field name="arch" type="xml">
            <form string="Log institution traveller report detail">
                <sheet>
                    <group>
                        <field name="txt_filename" invisible="1" />
                        <field name="error_sending_data" />
                        <field name="date" />
                        <field name="txt_incidencies_from_institution" select="1" />
                        <field
                            name="file_incidencies_from_institution"
                            filename="txt_filename"
                            readonly="1"
                        />
                        <field name="target_date" />
                        <field name="pms_property_id" />
                    </group>
                </sheet>
            </form>
        </field>
    </record>
    <record model="ir.ui.view" id="pms_log_institution_traveller_report_view_tree">
        <field name="name">pms.log.institution.traveller.report.tree</field>
        <field name="model">pms.log.institution.traveller.report</field>
        <field name="arch" type="xml">
            <tree
                name="Property Ubications"
                create="false"
                decoration-danger="error_sending_data"
            >
                <field name="date" />
                <field name="error_sending_data" />
                <field name="txt_incidencies_from_institution" />
                <field name="txt_filename" string="File" />
                <field
                    name="file_incidencies_from_institution"
                    filename="txt_filename"
                    readonly="1"
                    string="Size"
                />
                <field name="target_date" />
                <field name="pms_property_id" />
            </tree>
        </field>
    </record>

    <record model="ir.ui.view" id="pms_log_institution_traveller_report_view_search">
        <field name="name">pms.log.institution.traveller.report.search</field>
        <field name="model">pms.log.institution.traveller.report</field>
        <field name="arch" type="xml">
            <search string="Log institution traveller report">
                <field name="date" />
                <field name="target_date" />
                <field name="pms_property_id" />
            </search>
        </field>
    </record>

    <record
        model="ir.actions.act_window"
        id="open_pms_log_institution_traveller_report_form_tree"
    >
        <field name="name">Log of sending files to institutions</field>
        <field name="res_model">pms.log.institution.traveller.report</field>
        <field name="view_mode">tree,form</field>
    </record>
    <menuitem
        name="Log institution traveller report"
        id="menu_open_pms_log_institution_traveller_report_form_tree"
        action="open_pms_log_institution_traveller_report_form_tree"
        parent="pms.menu_reservations"
        sequence="28"
    />
</odoo>
