Skip to Content
Menu
This question has been flagged
1 Reply
3440 Views

Hello i want to add new menus and submenus under Invoicing.
I know i need an action for my menu and a view. I'm using Odoo11

This what i've got so far.

    <!-- menu categories -->
    <menuitem name="Localizaciones" id="localizaciones_menu_1" parent="menu_finance_receivables" sequence="6"/>
    <!-- sub-menu categories -->    
<menuitem name="Enviadas" id="localizaciones_submenu_1" parent="localizaciones_menu_1" sequence="1" action="x_nc_act_inv_fac_env"/>
<menuitem name="Pendientes" id="localizaciones_submenu_2" parent="localizaciones_menu_1" sequence="2" action="x_nc_act_inv_fac_pen"/>

            But i get the error

  File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_model.py", line 1318, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
odoo.tools.convert.ParseError: "External ID not found in the system: mymodule.menu_finance_receivables" while parsing /usr/lib/python3/dist-packages/odoo/addons/mymodule/views/views.xml:292, near
<menuitem name="Localizaciones" id="localizaciones_menu_1" parent="menu_finance_receivables" sequence="6"/>

So i though the problem might be the inheritance from my module. But i already inherited account.invoice on my models.py and set my dependence like:

    'depends': ['base','account','sale'],

I don't know what am I missing. Thanks in advance.


Avatar
Discard
Best Answer

Hi,

The problem is with the parent ID  you have given. Hope the parent id you given is the menu which is already under the invoicing menu.


The external ID for the corresponding menu will be like account.menu_finance_receivables something like this.


To get it exactly activate the developer mode and navigate to Settings -> Technical ->  User interface -> Menu items and search the parent menu name here. Open the menu and click on the lady debugger button near the logged in users name, the from the listing click on the view metadata from here you will get the external ID of corresponding menu, copy it and paste it in the code.


 See the video to see how to get the external ID of a menu: https://youtu.be/rK5Qe8mA89Q


Thanks

Avatar
Discard
Related Posts Replies Views Activity
2
Sep 22
668
2
Oct 20
3022
3
Feb 21
24799
2
Dec 19
1741
2
Aug 18
2447