Skip to Content
Menu
This question has been flagged

I have a module already installed inside my project with a couple of new tables. Now, I want to add XML associated with these tables to create menu items.

In my openerp.py, I had this code:

 'data': ['main.xml', 'security/ir.model.access.csv']

Now, I want to add a new file containing my XML:

 'data': ['main.xml', 
          'trips.xml',
          'security/ir.model.access.csv']

trips.xml looks like this:

<openerp>
    <data>

        <record id="action_partner_trip_form" model="ir.actions.act_window">
            <field name="name">Trips</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">res.partner.trip</field>
            <field name="view_type">form</field>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to create a new trip.
              </p>
            </field>
        </record>

        <menuitem action="action_partner_trip_form" name="Trips" sequence="4" parent="base.menu_sales" groups="base.group_no_one"/>
    </data>
</openerp>

I restarted the server and also updated my main package, but the new XML is not loaded into the application. Also, there are no errors inside my logs.

Of course, if I uninstall -> reinstall it, my XML is loaded and my menu items are added, but I lose precious data.

Avatar
Discard

What do you mean 'updated my main package'? You need to upgrade your module, the custom one that has all this code in it.

Author

Hey,

Sorry for the naming, I updated my custom module yep!

Related Posts Replies Views Activity
3
Jun 20
17518
1
Mar 23
4466
2
Feb 23
1716
1
Dec 22
3871
0
Apr 17
3670