Custom User Preference Menus

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 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’: ‘’,
‘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:

You must be logged in to post a comment.