Se rendre au contenu
Menu
Cette question a été signalée

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
Ignorer

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

Auteur

Hey,

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

Publications associées Réponses Vues Activité
3
juin 20
20167
1
mars 23
5666
2
févr. 23
3021
1
déc. 22
5247
0
avr. 17
4872