Reputation: 1810
I'm try to create a sub menu in sale menu in my custom module, just after product link, but it doesn't appear..
In my module, after install it, I see the name of my menu in "Created menu".
I try just with this code in my view:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem name="Gamme" id="menu_gamme" parent="base.menu_product"/>
</data>
</openerp>
or with this code :
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem name="Gamme" id="menu_gamme" parent="base.menu_product"/>
<record model="ir.actions.act_window" id="action_gamme">
<field name="name">Gamme</field>
<field name="model">gamme</field>
<field name="view_type">tree</field>
<field name="view_mode">tree,form</field>
</record>
</data>
</openerp>
but with latest I have this error :
ValueError: No such external ID currently defined in the system: ailailail.action_gamme
Upvotes: 0
Views: 732
Reputation: 63
Try these changes to your code . You need have action value in your menu tag that takes the id of your ir.actiona.act_windows record. It will automatically take the name "Gamme" from the field name mentioned in the record, you dont need to specify it
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.actions.act_window" id="action_gamme">
<field name="name">Gamme</field>
<field name="model">gamme</field>
<field name="view_type">tree</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_gamme" id="menu_gamme" parent="base.menu_product"/>
</data>
</openerp>
Hope this helps....
Upvotes: 1