<odoo>
  <data>

    <record id="host_form" model="ir.ui.view">
        <field name="name">runbot.host.form</field>
        <field name="model">runbot.host</field>
        <field name="arch" type="xml">
            <form string="Host">
                <sheet>
                    <group>
                        <field name="name" readonly='1'/>
                        <field name="disp_name"/>
                        <field name="active"/>
                        <field name="use_remote_docker_registry"/>
                        <field name="docker_registry_url"/>
                        <field name="last_start_loop" readonly='1'/>
                        <field name="last_end_loop" readonly='1'/>
                        <field name="last_success" readonly='1'/>
                        <field name="assigned_only"/>
                        <field name="nb_worker"/>
                        <field name="nb_run_slot"/>
                        <field name="last_exception" readonly='1'/>
                        <field name="exception_count" readonly='1'/>
                    </group>
                    <notebook>
                        <page string="Messages">
                            <field name="host_message_ids" readonly='1'/>
                        </page>
                        <page string="Builds">
                            <field name="build_ids" widget="many2many" options="{'not_delete': True, 'no_create_edit': True}" readonly='1'>
                                <list string="Builds">
                                    <field name="create_date"/>
                                    <field name="global_state"/>
                                    <field name="global_result"/>
                                    <field name="job"/>
                                    <field name="dest" widget="char_frontend_url"/>
                                </list>
                            </field>
                        </page>
                    </notebook>
                </sheet>
                <chatter/>
            </form>
        </field>
    </record>

    <record id="view_host_tree" model="ir.ui.view">
        <field name="name">runbot.host.list</field>
        <field name="model">runbot.host</field>
        <field name="arch" type="xml">
            <list string="Builds">
                <field name="name"/>
                <field name="disp_name"/>
                <field name="assigned_only" widget="boolean_toggle"/>
                <field name="use_remote_docker_registry" widget="boolean_toggle"/>
                <field name="nb_worker"/>
                <field name="nb_run_slot"/>
            </list>
        </field>
    </record>

    <record id="open_view_host_tree" model="ir.actions.act_window">
        <field name="name">Host</field>
        <field name="res_model">runbot.host</field>
        <field name="view_mode">list,form</field>
    </record>

  </data>
</odoo>
