How to add new menu in invoicing app odoo

Viewed 30

I want to add new menu in invoicing app. But the problem is when I install the account_accounted module, this module is not moved under the accounting app and display like below image. How can I do that? In the invoicing app, there is only one menu for my menuitem.I want to move under accounting module when I install account_accountant.

<menuitem
        name="Commissions Management"
        id="menu_commissions_management"
        parent="account.menu_finance"
        groups="account.group_account_manager"
        sequence="1"
    />

enter image description here

enter image description here

1 Answers

I suppose you're using Odoo 15 and talk about account_accountant module in Enterprise.

In this specific case, it's kind of difficult to have it done within one module.

At least if you want your module to place the menu depending on what module is installed (like, if account_accountant is not installed you want it in Invoicing, else in Accounting).

Here is what happens in account_accountant that moves Invoicing modules to Accounting :

<!-- move existing submenus to point to the new parent -->
<record id="account.menu_finance_receivables" model="ir.ui.menu">
    <field name="parent_id" ref="menu_accounting"/>
</record>

So, I see two solutions to that.

1/ You create a second module that you install if account_accountant is installed, which does the same trick and moves your menus.

2/ You put your menu in one of the existing menu of Invoicing (e.g. Configuration), which will make that this move of menu in account_accountant :

<record id="account.menu_finance_configuration" model="ir.ui.menu">
    <field name="parent_id" ref="menu_accounting"/>
</record>

will move your submenu at the same time...

If you need any more detail/help, don't hesitate asking.

Related