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

    <record id="view_mgmtsystem_hazard_type_form" model="ir.ui.view">
      <field name="name">mgmtsystem.hazard.type.form</field>
      <field name="model">mgmtsystem.hazard.type</field>
      <field name="arch" type="xml">
        <form string="Type">
          <group colspan="4" col="4">
              <field name="company_id" groups="base.group_multi_company" />
              <newline />
            <field name="name" />
            <newline />
            <field name="description" />
          </group>
        </form>
      </field>
    </record>

    <record id="view_mgmtsystem_hazard_type_tree" model="ir.ui.view">
      <field name="name">mgmtsystem.hazard.type.tree</field>
      <field name="model">mgmtsystem.hazard.type</field>
      <field name="arch" type="xml">
        <tree>
            <field name="company_id" groups="base.group_multi_company" />
          <field name="name" />
          <field name="description" />
        </tree>
      </field>
    </record>

    <record id="view_mgmtsystem_hazard_type_filter" model="ir.ui.view">
      <field name="name">Types</field>
      <field name="model">mgmtsystem.hazard.type</field>
      <field name="arch" type="xml">
        <search string="Types">
            <field name="company_id" groups="base.group_multi_company" />
          <field name="name" />
          <field name="description" />
        </search>
      </field>
    </record>

    <record id="open_mgmtsystem_hazard_type_list" model="ir.actions.act_window">
      <field name="name">Types</field>
      <field name="res_model">mgmtsystem.hazard.type</field>
      <field name="view_mode">tree,form</field>
      <field name="view_id" eval="False" />
      <field name="search_view_id" ref="view_mgmtsystem_hazard_type_filter" />
    </record>

    <menuitem
        id="menu_open_hazard_type"
        action="open_mgmtsystem_hazard_type_list"
        parent="menu_mgmtsystem_configuration_hazards"
        sequence="20"
        groups="mgmtsystem.group_mgmtsystem_manager"
    />

</odoo>
