Odoo - OpenERP - How to Configure Custom User Preference Menus ?

| 2 1 2
Asked on 8/15/15, 7:35 AM

While deploying any Odoo product, we have to make sure that the unnecessary details should not get deployed on the live environment i.e Manage Database option, Some menus in Preferences etc,
In this blog we will see how to change the preference menus in odoo that too by following best practices in customization like inheriting views, templates etc.

Here we will create one separate module “custom_preference_menu” and we will inherit the template from web (addons/web/static/src/xml/base.xml) module which generates sub menus in user preferences.

Let’s Start step by step.

Step 1:
Create a folder with any name. This name will be the technical name of our module.
ex. custom_preference_menu

Step 2:
Create a File & Folder structure as specified below:

File & Folder Structure:


Step 3:


Open __openerp__.py file and write the following lines of code (or you can simply copy it).


‘name': ‘Custom Preference Menu’,
‘version': ‘1.0’,
‘category': ‘Tools’,
‘sequence': 1,
‘summary': ‘ Custom unused menus from User’s Preference Menu’,
‘description': “””
Custom Preference Menu
‘author': ‘Nevpro Business Solutions Pvt. Ltd.’,
‘website': ‘http://www.nevpro.co.in’,
‘depends': [‘base’],
‘data': [],
‘demo_xml': [],
‘qweb': [‘static/src/xml/template.xml’],
‘installable': True,
‘application': True,
‘auto_install': False,

Step 4:
Open template.xml file and write the following lines of code (or you can simply copy it).


<?xml version=”1.0″ encoding=”UTF-8″?>

<templates id=”template” xml:space=”preserve”>

<t t-extend=”UserMenu”>
<t t-jquery=”.dropdown-menu” t-operation=”replace”>
<ul class=”dropdown-menu”>
<li><a href=”#” data-menu=”settings”>Preferences</a></li>
<li><a href=”#” data-menu=”about”>About Odoo</a></li>
<li><a href=”#” data-menu=”logout”>Log out</a></li>


#User’s Menu before and after installing our module:


| 2 1 2
Answered on 8/15/15, 7:35 AM

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!

Ask a Question

Keep Informed

About This Forum

This forum is for HiTechnologia Employees & just Odoo general knowledge purpose only.

Read Guidelines

Question tools

3 follower(s)


Asked: 8/15/15, 7:35 AM
Seen: 6538 times
Last updated: 8/15/15, 7:35 AM