NeoVe
NeoVe

Reputation: 3897

Menuitem not shown on Odoo v9 community

I have this code:

      <record id="view_origen_form" model="ir.ui.view">
      <field name="name">origen.form</field>
      <field name="model">origen</field>
      <field name="arch" type="xml">
          <form string="Origen">
              <group>
                <field name="origen"/>
              </group>
          </form>
      </field>
  </record>

  <record id="view_origen_tree" model="ir.ui.view">
      <field name="name">origen.tree</field>
      <field name="model">origen</field>
      <field name="arch" type="xml">
          <tree string="Origen">
                <field name="origen"/>
          </tree>
      </field>
  </record>

  <record model="ir.actions.act_window" id="origen_view">
      <field name="name">Origen</field>
      <field name="type">ir.actions.act_window</field>
      <field name="res_model">origen</field>
      <field name="view_type">form</field>
      <field name="view_mode">tree,form</field>
  </record>

  <record id="view_destino_form" model="ir.ui.view">
      <field name="name">destino.form</field>
      <field name="model">destino</field>
      <field name="arch" type="xml">
          <form string="Destino">
              <group>
                <field name="destino"/>
              </group>
          </form>
      </field>
  </record>

  <record id="view_destino_tree" model="ir.ui.view">
      <field name="name">destino.tree</field>
      <field name="model">destino</field>
      <field name="arch" type="xml">
          <tree string="Destino">
                <field name="destino"/>
          </tree>
      </field>
  </record>

  <record model="ir.actions.act_window" id="destino_view">
      <field name="name">Destino</field>
      <field name="type">ir.actions.act_window</field>
      <field name="res_model">destino</field>
      <field name="view_type">form</field>
      <field name="view_mode">tree,form</field>
  </record>

Then, the menu actions for each one:

  <menuitem name="Origen" action="origen_view" id="origen_view_menu" parent="fleet.fleet_configuration"/>
  <menuitem name="Destino" action="destino_view" id="destino_view_menu" parent="fleet.fleet_configuration"/>

I don't get it, the items are not showing at all.

I'm inheriting this view from fleet module:

  <menuitem name="Configuration" parent="menu_root" id="fleet_configuration" sequence="100" groups="group_fleet_manager"/>

Any ideas?

Upvotes: 0

Views: 49

Answers (1)

Phillip Stack
Phillip Stack

Reputation: 3378

When adding views, menu items, or any xml asset in Odoo remember to reference the file in your manifest.

This is either __openerp__.py or __manifest__.py depending on what version of Odoo you are operating.

Upvotes: 1

Related Questions