Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Sequence of Menus(Through Code)

By
aci aisha
on 2/12/15, 1:11 AM 1,221 views

Friends,

Usually i write sequence for menu from settings>User Interface>Menu Items in odoo.

Can we write it directly in any files like we write access writes for a group?

Thanks..

THANK U ALL!!!

aci aisha
on 2/12/15, 1:53 AM
2
Mansi Kariya (mka)
On 2/12/15, 1:36 AM

Hello aisha,

You can give sequence on menus through code by simply adding sequence attribute on that particular menu in xml file where usually menuitem is defined. The higher sequence number will set that menu downer accordingly. Default sequence will be set to 10 for any menu. For example,

<menuitem id="menuitem_id" name="Position/Of/The/Menu/Item/In/The/Tree" action="action_id" icon="NAME_FROM_LIST" groups="groupname" sequence="<integer>"/>

example-

    <menuitem id="menu_fleet_reporting_costs"
              parent="menu_fleet_reporting"
              action="action_fleet_reporting_costs"
              sequence="1"
              groups="group_fleet_manager"/>

Note - Menu items with the same sequence numbers are sorted by order of creation (_order = "sequence,id").

And yeah after updating xml file, Don't forget to update that module to apply changes.

For more details, You can go through doc link

Hope this will help you.

1
NT007
On 2/12/15, 1:36 AM

You can set the menu item sequence in the view XML file.

An example would be:

<menuitem name="Phone Calls" id="menu_crm_case_phone"
        groups="base.group_sale_salesman"
        parent="base.menu_base_partner" sequence="4" />

1

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 2/12/15, 1:40 AM

Hi,you may use this in your xml file

<menuitem id="menu_email_templates" parent="menu_configuration_misc" action="action_email_templates" sequence="30" groups="base.group_no_one"/>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/12/15, 1:11 AM
Seen: 1221 times
Last updated: 3/16/15, 8:10 AM