Hi all,
I am trying to create a new menu based on a new module I am working on for Odoo v12.
I have "scaffolded" the module and using the scaffold struture.
The problem I found is that the menu structure is not shown on Odoo after module installed.
I have checked under Technical | Menu Items and they exist.
Also checked for the "action" and views and they also part of the database.
The code I used:
1. Module.py
class vehicles_brands(models.Model):
_name='vehicles.brands'
_description="Vehicle Brands"
name = fields.Char(string="Brand", size=64, required=True)
2. Xml
<odoo>
<data>
<!-- TREE VIEW DEFINITION -->
<record model="ir.ui.view" id="vehicles.brands_tree_view">
<field name="name">Vehicles</field>
<field name="model">vehicles.brands</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
</tree>
</field>
</record>
<!-- actions opening views on models -->
<record model="ir.actions.act_window" id="vehicles.brands_action_window">
<field name="name">Vehicle Brands</field>
<field name="res_model">vehicles.brands</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Top menu item -->
<menuitem name="Vehicles" id="vehicles.menu_root"/>
<!-- Menu Category -->
<menuitem name="Master Data" id="vehicles.data_menu" parent="vehicles.menu_root"/>
<menuitem name="Brands" id="vehicles.brands_option" parent="vehicles.data_menu" action="vehicles.brands_action_window"/>
</data>
</odoo>
I have no errors on the log and also confirm that the module is upgraded after every test.
What is wrong with this code?
PS: If I use the exact same code on Odoo 11 everything works fine.
Thank you in advance.
Odoo Access Rights: https://goo.gl/8DZYRT
Sehrish, thanks for the link. I have everything I need in this link. Regards
The menu is not visible as the access rights is not set, see this video to understand how to set access rights in odoo: https://www.youtube.com/watch?v=W5ya521uTlo&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM&index=7