Skip to Content
Menu
This question has been flagged

Hello everyone,

I am trying to create a custom menu in Odoo 17, but despite multiple attempts, the menu does not appear in the interface. The menu I am creating is supposed to inherit from the om_hr_payroll module. Below are the details of my implementation:

  • The associated form view for the report.wizard model is defined like this:
<odoo>    
<record id="view_report_form" model="ir.ui.view">       
<field name="name">report.form</field>       
<field name="model">report.wizard</field>       
<field name="arch" type="xml">           
<form string="Générer Rapport">               
<group>                   
<field name="date_start"/>                   
<field name="date_end"/>               
</group>               
<footer>                   
<button string="Générer" type="object" name="generate_report" class="btn-primary"/>                   
<button string="Annuler" class="btn-secondary" special="cancel"/>          </footer>           
</form>       
</field>   
</record>
</odoo>
  • The action_report_excel is defined as follows:
 <record id="action_report_excel" model="ir.actions.act_window">                           
<field name="name">Rapport en Excel</field>       
<field name="res_model">report.wizard</field>       
<field name="view_mode">form</field>       
<field name="view_id" ref="view_report_form"/>       
<field name="target">new</field>   
</record>
  • I created a new menu item in my XML file as follows:
<odoo>
  <menuitem id="menu_custom_payroll" name="Rapport" parent="om_hr_payroll.menu_hr_payroll_root"/>   
<menuitem id="menu_report_excel" name="Rapport en Excel" parent="menu_custom_payroll" action="action_report_excel" sequence="50"/>
</odoo>


  1. I've updated the module, restarted Odoo, and activated developer mode.
  2. Checked the logs but found no critical error message.

Additional Information:

The new menu and sub-menu are supposed to inherit from the om_hr_payroll module under the root menu_hr_payroll_root. Despite following the steps above, the menu and sub-menu still do not appear.

What could be causing the menu not to display? Am I missing something in the configuration or setup? Any advice or pointers would be greatly appreciated!

Avatar
Discard
Best Answer

Hi,
Ensure menu record is created in the ir.ui.menu model and ensure an action is linked with the menu. If there is no action linked with menu the menu wont be shown in the UI, also ensure no user groups is assigned to the menu, if there is, ensure logged in user is part of the group. 


And of-course ensure all the files are imported in manifest and service is restarted

See:  https://www.youtube.com/watch?v=y8USDEpQvPM

Thanks

Avatar
Discard
Best Answer

Please check whether you have loaded the xml in manifest or not.

Also check it the menu is created in odoo by going in to the Menu Items master in odoo.

Avatar
Discard
Author Best Answer

Ok thank you. The xml file is loaded on manifest. I will chech if the menu is on odoo techinical interface

Avatar
Discard
Related Posts Replies Views Activity
0
Nov 16
3487
2
Jul 25
1463
1
Mar 25
1016
1
Dec 24
945
1
Dec 24
1272