Develop a Custom Settings Page in Odoo

Odoo's framework provides the ability to create settings pages for modules and applications.

Odoo's framework provides the ability to create settings pages for modules and applications. In this video learn how to use this framework to create your own custom settings page.

Video Length: 46 Minutes

Building a custom settings page using Odoo's framework

Often times when building a module or application you will need to create or modify a settings page to provide an administrator the ability to configure the application for a specific business requirement. If you have built your own settings page you already know there are a few things you must understand about the Odoo framework... If you are new to developing settings pages, this video is for you.

Taking a step-by-step approach to developing Odoo modules

Once again this video takes a step-by-step approach in teaching you exactly how to customize the Odoo framework and solve business requirements. Learn how to customize settings pages in Odoo and provide your users with specific configuration options for your module or application. In this video we use a real-world development example that adds real functionality to the application.

What do I need to know to develop settings pages in Odoo?

This video will be useful to anyone who understands the basics of Odoo development. If you are new to developing modules or applications in Odoo it would likely be best for you to first watch some of the associated videos provided below.

Step 1 - Finding the view for the settings form

In our real world example we take an application that provides Slack integration into Odoo and wish to make the application easier to configure by providing a settings page.

As this application will integrate with the sales/crm application we want to customize the sale settings to include new options for our slack application. We can easily find out which view we need to customize by turning on developer mode and navigating to the settings page and choosing Edit FormView from the developer settings.

Step 2 - Understand the view inheritence

Next you must determine which view you wish to inherit from and find it's extrenal_id. You can see here that for the sale.settings view that we have the Inherited Views tab selected. Under there we can the options that the CRM application has added to the sale.settings menu. We wish to inherit from the CRM view crm.view_sale_config_settings because this application is a CRM application that manages customer relationships. This also means that the CRM application must be installed in order for our custom Slack integration application to function properly.

Code from the standard Odoo sales configuration settings

<record id="view_sale_config_settings" model="ir.ui.view">
<field name="name">sale settings</field>
<field name="model">sale.config.settings</field>
<field name="arch" type="xml">
<form string="Configure Sales" class="oe_form_configuration" name="sale_config_form">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
<div id="main"/>
</form>
</field>
</record>


Step 3 - Determine the external id from the parent view you wish to inherit from

In the video we demonstrate the steps in determining which views you need to inherit from and how you can use the developer mode to help you along in that process. Ultimately the most important thing you must do to proceed in creating your own custom view is to find the external_id you must inherit from.
If your are new to Odoo Development this can be a little confusing at first. That is largely why the video dedicates time in showing you how to navigate the various views in Odoo so you can completely understand how everything fits together.

Step 4 - Add fields to the model

This should be very simple for even beginning Odoo developers. Simply add the custom fields you wish to use for storing your custom settings. Details for this step are provided in the video.

Step 5 - Create your custom view

Now that you know exactly how you need to integrate your view with Odoo's CRM application and associated settings we can begin writing our view.

As you will see in the code example we create a record in XML that inherits from sales_team.view_sale_config_settings. This demonstrates a typical aspect of Odoo development. Much of the work is examining existing Odoo source code. In fact if you are not spending a lot of time looking at the base Odoo application code when building your own custom modules, you are probably doing something wrong... or at the very least you are not being productive.

Code Example for a Custom Settings View in Odoo
<record id="view_slack_config_settings" model="ir.ui.view">
<field name="name">slack settings</field>
<field name="model">sale.config.settings</field>
<field name="inherit_id" ref="sales_team.view_sale_config_settings"/>
<field name="arch" type="xml">
<div id="main" position="inside">
<group string="Slack" name="config_slack">
<label for="module_crm_slack" string="Slack integration"/>
<div>
<field name="module_crm_slack" class="oe_inline"/>
<label for="module_crm_slack" invisible="1"/>
</div>
</group>
</div>
</field>
</record>

TOPICS INCLUDE:

Introduction: Create a custom settings page for slack integration
Using debug mode to analyze the CRM settings page
Locating the view_sale_config_settings view to inherit the settings page
Extending the sale.config.settings as a transient model
Begin tying in the slack API integration
Creating a new slack.config model to hold CRM settings
Understanding ip.config.parameter to store config settings
Using the Google Map API as a template for the Slack API


Your Instructor


Diogo Duarte
Diogo Duarte

Diogo Duarte has a degree in Electrical Engineering and Computer Science with 20 years of experience in several industries, both functional and technical. He is an Odoo developer and Project Manager across the EU, the USA, and AU and the Head of Technical Consulting for OdooClass since 2014.


Diogo is an expert in all things Odoo and has been consulted on hundreds of Odoo projects in nearly every industry sector. If you need a problem solved with Odoo, Diogo can find you a solution.

Diogo is also the creator of much of the training content available on the OdooClass website and has been performing the weekly and monthly workshops with subscribers around the globe since 2014.

Course Curriculum


  First Section
Available in days
days after you enroll

Frequently Asked Questions


When does the course start and finish?
The course starts now and never ends! It is a completely self-paced online course - you decide when you start and when you finish.
How long do I have access to the course?
How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.
What if I am unhappy with the course?
We would never want you to be unhappy! If you are unsatisfied with your purchase, contact us in the first 30 days and we will give you a full refund.

Get started now!