SlideShare ist ein Scribd-Unternehmen logo
1 von 27
How to Build Custom
Module in Odoo 15
www.cybrosys.com
INTRODUCTION
❖ In this slide let us see how we can create a new custom module in Odoo 12.
The things covered in the blog are,
a) Creating a new model
b) Creating different views mainly form and tree
c) New Menu etc
❖ In the custom directory which named as ‘custom_addons’. At here, let’s create the custom
module which named as ‘event_management’, Then give the path of custom addons file in the
odoo 15 conf file.
❖ First let’s create the ‘init’ and ‘manifest’ file. Both are python file.
➢ init file- File we have to import all the python files that we are going to use.
➢manifest file- It is the metadata of the module.
❖ So, first of all, let us look at the manifest file and see what its use is.
manifest file, here is the place where we define the details such as the name of the module, its
version, category, author name etc.
* Name – Name of the module to be displayed.
* Version – version of the released module.
* Summary – Summary for the module.
* Category – Category of the module, whether it is sales, purchase, the point of sale etc.
* depends – Suppose if our module depends on any other modules, we have to mention that name
in the depends. As we are going to create a new module and as it is not depending on any other
modules, just add depends as the base.
* data – In the data section, we have to specify all the .xml files here. In our case, we have to
mention the view.xml
❖ Now, let’s create a security folder under the ‘event_management’ module.
❖ In the security folder, we will place the files related to the security. Here we have to create a
csv file inside the security folder. That is, ‘ir.model.access.csv’.
❖ At the ‘csv’ file we can declare the access for each model for which of the users who have the
permission to read, write or edit that particular object.
❖ Then, let’s create the models. Models are the object of this particular module. So where we need to
add the functionality or extend the functionality that can be do in the models file. So let’s create the
directory for models. Under the directory of the model it have python file, First add the ‘init’ file, this is
a required python file under the model directory, where we need to import the python packages or
python file we needed.
❖ Then, We have to create a python file, that we can create the object that we needed for this
custom module. Here i’m creating ‘event.py’.
➢ The first thing we have to do is, import the models folder in the main ‘__init__.py’ file.
 And the created python file, that is, ‘event.py’ import this python file in the inner ‘__init__.py’ file.
❖ So let us move to the ‘event.py’ file that we have imported now. Here in this file, we will define the models and
fields to store the data into the database.So let our model be ‘event.management’, this will create a table in
the database and we have to define the fields to accept the values.
❖ There will be different types of fields, they are Character, Integer, Float, Many2one, Many2many, Boolean etc.
So in our event management record, we need to record the values such as Event Name, Start Date, End
Date, No. of Attendees.
❖ Now we have created the fields. Next, we have to define the view so that it can be seen in the Odoo user
interface.We have to create a directory ‘views’.
❖ Also, We have to create a file inside the folder views, the file is ‘event_view.xml, inside this file, we will define
the menu and the view.
❖ So let us look at how to create an XML file and the menu first.
❖ Here, in the event_view.xml file we have defined two menus, one menu is the main menu named
‘Event Management’ and under that menu, we have created another menu named ‘Event’.
❖ So now on clicking the menu, some action has to take place. So let us look at how the action
can be defined. After defining the action it should be given to the menu.
❖ Now we have defined the action for the menu, if you look at the previous code, you can see that in the
res_model we have given the name of the table we have created in the event.py file, that means on clicking
the menu the action is going to this model.In the view mode, we have specified the views as tree and form.
We have got many other views like kanban, pivot, calendar, etc. But here we are using only tree and
form.Now let us link the above-created action to the menu ‘events’.
❖ Now our event_view.xml will be like this,
❖ Now let us stop defining the view here and add this view to the manifest file that we have
created earlier. Inside the manifest file, you can see a tag data in that you have to add this file.
❖ As the event_view.xml is inside the views folder when specifying the path in the manifest
file. Also added the security file in the ‘manifest’ file. So now the manifest file will be like this,
❖ Now just restart your odoo service and activate the developer mode and click on the Apps ->
Update Apps List -> Update.
❖ Once you click the Update button, search for the module that we have created now, either you can search
using the folder name, which is called the technical name of the module, in our case the technical name of the
module we have created is event management and the name of the module is the name we have given inside
the manifest file which is also Event Management.
❖ Now we can Install the module by clicking the Install button and see what happens. After a few seconds
loading the module will get installed, if it successfully installed it will redirect to home screen else it will show
up an error message. For it installed successfully, to ensure it, come back to apps menu and search our
module and see its status.
❖ Now, you can see the menu named Event Management.
❖ Click on the Event Management menu, you can see a submenu named Event Management.
❖ Here you can create your first event record.
For More
Details
Check our company website for related blogs and Odoo
book.
Odoo Book V15
Check our YouTube channel for functional and technical
videos in Odoo.
How to Build Custom Module in Odoo 15
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...Celine George
 
View Inheritance in Odoo 16
View Inheritance in Odoo 16View Inheritance in Odoo 16
View Inheritance in Odoo 16Celine George
 
Odoo's Test Framework - Learn Best Practices
Odoo's Test Framework - Learn Best PracticesOdoo's Test Framework - Learn Best Practices
Odoo's Test Framework - Learn Best PracticesOdoo
 
What is Delegation Inheritance in Odoo 15
What is Delegation Inheritance in Odoo 15What is Delegation Inheritance in Odoo 15
What is Delegation Inheritance in Odoo 15Celine George
 
List Activity Widget in Odoo 14
List Activity Widget in Odoo 14 List Activity Widget in Odoo 14
List Activity Widget in Odoo 14 Celine George
 
How to Make Sequence Number in Odoo 16
How to Make Sequence Number in Odoo 16How to Make Sequence Number in Odoo 16
How to Make Sequence Number in Odoo 16Celine George
 
Odoo - Smart buttons
Odoo - Smart buttonsOdoo - Smart buttons
Odoo - Smart buttonsOdoo
 
Empower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsEmpower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsOdoo
 
Change date format in odoo
Change date format in odooChange date format in odoo
Change date format in odoodeeps virzoteck
 
Actions and menus in odoo 16
Actions and menus in odoo 16Actions and menus in odoo 16
Actions and menus in odoo 16Celine George
 
Owl: The New Odoo UI Framework
Owl: The New Odoo UI FrameworkOwl: The New Odoo UI Framework
Owl: The New Odoo UI FrameworkOdoo
 
Odoo External API
Odoo External APIOdoo External API
Odoo External APIOdoo
 
BÀI GIẢNG NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU
BÀI GIẢNG NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU BÀI GIẢNG NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU
BÀI GIẢNG NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU nataliej4
 
Giáo trình mô phỏng phân tích lực trên Autodesk Inventor
Giáo trình mô phỏng phân tích lực trên Autodesk InventorGiáo trình mô phỏng phân tích lực trên Autodesk Inventor
Giáo trình mô phỏng phân tích lực trên Autodesk InventorTrung tâm Advance Cad
 
Creating a custom Moodle Mobile app - MoodleMoot Spain 2014
Creating a custom Moodle Mobile app -  MoodleMoot Spain 2014Creating a custom Moodle Mobile app -  MoodleMoot Spain 2014
Creating a custom Moodle Mobile app - MoodleMoot Spain 2014Juan Leyva Delgado
 
Xây dựng biểu đồ use case
Xây dựng biểu đồ use caseXây dựng biểu đồ use case
Xây dựng biểu đồ use caseTrung Chinh Hà
 
Module Structure in Odoo 16
Module Structure in Odoo 16Module Structure in Odoo 16
Module Structure in Odoo 16Celine George
 
Updating Client Interface 'on change' @api.onchange in Odoo 15
Updating Client Interface 'on change' @api.onchange in Odoo 15Updating Client Interface 'on change' @api.onchange in Odoo 15
Updating Client Interface 'on change' @api.onchange in Odoo 15Celine George
 
Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15Celine George
 

Was ist angesagt? (20)

What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
 
View Inheritance in Odoo 16
View Inheritance in Odoo 16View Inheritance in Odoo 16
View Inheritance in Odoo 16
 
Odoo's Test Framework - Learn Best Practices
Odoo's Test Framework - Learn Best PracticesOdoo's Test Framework - Learn Best Practices
Odoo's Test Framework - Learn Best Practices
 
What is Delegation Inheritance in Odoo 15
What is Delegation Inheritance in Odoo 15What is Delegation Inheritance in Odoo 15
What is Delegation Inheritance in Odoo 15
 
List Activity Widget in Odoo 14
List Activity Widget in Odoo 14 List Activity Widget in Odoo 14
List Activity Widget in Odoo 14
 
How to Make Sequence Number in Odoo 16
How to Make Sequence Number in Odoo 16How to Make Sequence Number in Odoo 16
How to Make Sequence Number in Odoo 16
 
Odoo - Smart buttons
Odoo - Smart buttonsOdoo - Smart buttons
Odoo - Smart buttons
 
Widgets in odoo
Widgets in odooWidgets in odoo
Widgets in odoo
 
Empower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo MixinsEmpower your App by Inheriting from Odoo Mixins
Empower your App by Inheriting from Odoo Mixins
 
Change date format in odoo
Change date format in odooChange date format in odoo
Change date format in odoo
 
Actions and menus in odoo 16
Actions and menus in odoo 16Actions and menus in odoo 16
Actions and menus in odoo 16
 
Owl: The New Odoo UI Framework
Owl: The New Odoo UI FrameworkOwl: The New Odoo UI Framework
Owl: The New Odoo UI Framework
 
Odoo External API
Odoo External APIOdoo External API
Odoo External API
 
BÀI GIẢNG NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU
BÀI GIẢNG NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU BÀI GIẢNG NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU
BÀI GIẢNG NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU
 
Giáo trình mô phỏng phân tích lực trên Autodesk Inventor
Giáo trình mô phỏng phân tích lực trên Autodesk InventorGiáo trình mô phỏng phân tích lực trên Autodesk Inventor
Giáo trình mô phỏng phân tích lực trên Autodesk Inventor
 
Creating a custom Moodle Mobile app - MoodleMoot Spain 2014
Creating a custom Moodle Mobile app -  MoodleMoot Spain 2014Creating a custom Moodle Mobile app -  MoodleMoot Spain 2014
Creating a custom Moodle Mobile app - MoodleMoot Spain 2014
 
Xây dựng biểu đồ use case
Xây dựng biểu đồ use caseXây dựng biểu đồ use case
Xây dựng biểu đồ use case
 
Module Structure in Odoo 16
Module Structure in Odoo 16Module Structure in Odoo 16
Module Structure in Odoo 16
 
Updating Client Interface 'on change' @api.onchange in Odoo 15
Updating Client Interface 'on change' @api.onchange in Odoo 15Updating Client Interface 'on change' @api.onchange in Odoo 15
Updating Client Interface 'on change' @api.onchange in Odoo 15
 
Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15
 

Ähnlich wie How to Build Custom Module in Odoo 15

Odoo 15 Composition of Module
Odoo 15 Composition of ModuleOdoo 15 Composition of Module
Odoo 15 Composition of ModuleCeline George
 
Building a Module in Odoo 16
Building a Module in Odoo 16Building a Module in Odoo 16
Building a Module in Odoo 16Celine George
 
How to Build a Module in Odoo 15 Scaffold Method
How to Build a Module in Odoo 15 Scaffold MethodHow to Build a Module in Odoo 15 Scaffold Method
How to Build a Module in Odoo 15 Scaffold MethodCeline George
 
Tips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxTips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxAgusto Sipahutar
 
Composition of a Module in Odoo 16
Composition of a Module in Odoo 16Composition of a Module in Odoo 16
Composition of a Module in Odoo 16Celine George
 
Django tutorial
Django tutorialDjango tutorial
Django tutorialKsd Che
 
Django is a high-level Python web framework that enables rapid development of...
Django is a high-level Python web framework that enables rapid development of...Django is a high-level Python web framework that enables rapid development of...
Django is a high-level Python web framework that enables rapid development of...ArijitDutta80
 
Tips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxTips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxAgusto Sipahutar
 
Oracle User Productiviy Kit
Oracle User Productiviy KitOracle User Productiviy Kit
Oracle User Productiviy KitLarry Sherrod
 
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST FrameworkEasy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST FrameworkInexture Solutions
 
Django 1.10.3 Getting started
Django 1.10.3 Getting startedDjango 1.10.3 Getting started
Django 1.10.3 Getting startedMoniaJ
 
Mulesoft - Documentation (Automation)
Mulesoft - Documentation (Automation)Mulesoft - Documentation (Automation)
Mulesoft - Documentation (Automation)Vamsi Krishna
 
Getting started-with-oracle-so a-10
Getting started-with-oracle-so a-10Getting started-with-oracle-so a-10
Getting started-with-oracle-so a-10Amit Sharma
 
Create Data Files and Load Data in Odoo 15
Create Data Files and Load Data in Odoo 15Create Data Files and Load Data in Odoo 15
Create Data Files and Load Data in Odoo 15Celine George
 
External dependencies ,pre init hook & post init hook in odoo
External dependencies ,pre init hook & post init hook in odooExternal dependencies ,pre init hook & post init hook in odoo
External dependencies ,pre init hook & post init hook in odooCeline George
 
Automatic documantation with mule
Automatic documantation with muleAutomatic documantation with mule
Automatic documantation with muleSunil Komarapu
 

Ähnlich wie How to Build Custom Module in Odoo 15 (20)

Odoo 15 Composition of Module
Odoo 15 Composition of ModuleOdoo 15 Composition of Module
Odoo 15 Composition of Module
 
Building a Module in Odoo 16
Building a Module in Odoo 16Building a Module in Odoo 16
Building a Module in Odoo 16
 
How to Build a Module in Odoo 15 Scaffold Method
How to Build a Module in Odoo 15 Scaffold MethodHow to Build a Module in Odoo 15 Scaffold Method
How to Build a Module in Odoo 15 Scaffold Method
 
django
djangodjango
django
 
Tips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxTips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptx
 
Composition of a Module in Odoo 16
Composition of a Module in Odoo 16Composition of a Module in Odoo 16
Composition of a Module in Odoo 16
 
Django tutorial
Django tutorialDjango tutorial
Django tutorial
 
Django is a high-level Python web framework that enables rapid development of...
Django is a high-level Python web framework that enables rapid development of...Django is a high-level Python web framework that enables rapid development of...
Django is a high-level Python web framework that enables rapid development of...
 
Tips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptxTips On Trick Odoo Add-On.pptx
Tips On Trick Odoo Add-On.pptx
 
Oracle User Productiviy Kit
Oracle User Productiviy KitOracle User Productiviy Kit
Oracle User Productiviy Kit
 
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST FrameworkEasy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
 
DJango
DJangoDJango
DJango
 
Django - basics
Django - basicsDjango - basics
Django - basics
 
Django 1.10.3 Getting started
Django 1.10.3 Getting startedDjango 1.10.3 Getting started
Django 1.10.3 Getting started
 
Mulesoft - Documentation (Automation)
Mulesoft - Documentation (Automation)Mulesoft - Documentation (Automation)
Mulesoft - Documentation (Automation)
 
Getting started-with-oracle-so a-10
Getting started-with-oracle-so a-10Getting started-with-oracle-so a-10
Getting started-with-oracle-so a-10
 
Create Data Files and Load Data in Odoo 15
Create Data Files and Load Data in Odoo 15Create Data Files and Load Data in Odoo 15
Create Data Files and Load Data in Odoo 15
 
External dependencies ,pre init hook & post init hook in odoo
External dependencies ,pre init hook & post init hook in odooExternal dependencies ,pre init hook & post init hook in odoo
External dependencies ,pre init hook & post init hook in odoo
 
Automatic documantation with mule
Automatic documantation with muleAutomatic documantation with mule
Automatic documantation with mule
 
Mule
MuleMule
Mule
 

Mehr von Celine George

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
How to Make Down Payments in Odoo 17 Sales App
How to Make Down Payments in Odoo 17 Sales AppHow to Make Down Payments in Odoo 17 Sales App
How to Make Down Payments in Odoo 17 Sales AppCeline George
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17Celine George
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 

Mehr von Celine George (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Make Down Payments in Odoo 17 Sales App
How to Make Down Payments in Odoo 17 Sales AppHow to Make Down Payments in Odoo 17 Sales App
How to Make Down Payments in Odoo 17 Sales App
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17How to Manage Engineering to Order in Odoo 17
How to Manage Engineering to Order in Odoo 17
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 

Kürzlich hochgeladen

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Kürzlich hochgeladen (20)

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

How to Build Custom Module in Odoo 15

  • 1. How to Build Custom Module in Odoo 15 www.cybrosys.com
  • 2. INTRODUCTION ❖ In this slide let us see how we can create a new custom module in Odoo 12. The things covered in the blog are, a) Creating a new model b) Creating different views mainly form and tree c) New Menu etc
  • 3. ❖ In the custom directory which named as ‘custom_addons’. At here, let’s create the custom module which named as ‘event_management’, Then give the path of custom addons file in the odoo 15 conf file.
  • 4. ❖ First let’s create the ‘init’ and ‘manifest’ file. Both are python file. ➢ init file- File we have to import all the python files that we are going to use. ➢manifest file- It is the metadata of the module.
  • 5. ❖ So, first of all, let us look at the manifest file and see what its use is.
  • 6. manifest file, here is the place where we define the details such as the name of the module, its version, category, author name etc. * Name – Name of the module to be displayed. * Version – version of the released module. * Summary – Summary for the module. * Category – Category of the module, whether it is sales, purchase, the point of sale etc. * depends – Suppose if our module depends on any other modules, we have to mention that name in the depends. As we are going to create a new module and as it is not depending on any other modules, just add depends as the base. * data – In the data section, we have to specify all the .xml files here. In our case, we have to mention the view.xml
  • 7. ❖ Now, let’s create a security folder under the ‘event_management’ module. ❖ In the security folder, we will place the files related to the security. Here we have to create a csv file inside the security folder. That is, ‘ir.model.access.csv’.
  • 8. ❖ At the ‘csv’ file we can declare the access for each model for which of the users who have the permission to read, write or edit that particular object.
  • 9. ❖ Then, let’s create the models. Models are the object of this particular module. So where we need to add the functionality or extend the functionality that can be do in the models file. So let’s create the directory for models. Under the directory of the model it have python file, First add the ‘init’ file, this is a required python file under the model directory, where we need to import the python packages or python file we needed.
  • 10. ❖ Then, We have to create a python file, that we can create the object that we needed for this custom module. Here i’m creating ‘event.py’. ➢ The first thing we have to do is, import the models folder in the main ‘__init__.py’ file.
  • 11.  And the created python file, that is, ‘event.py’ import this python file in the inner ‘__init__.py’ file.
  • 12. ❖ So let us move to the ‘event.py’ file that we have imported now. Here in this file, we will define the models and fields to store the data into the database.So let our model be ‘event.management’, this will create a table in the database and we have to define the fields to accept the values. ❖ There will be different types of fields, they are Character, Integer, Float, Many2one, Many2many, Boolean etc. So in our event management record, we need to record the values such as Event Name, Start Date, End Date, No. of Attendees.
  • 13. ❖ Now we have created the fields. Next, we have to define the view so that it can be seen in the Odoo user interface.We have to create a directory ‘views’. ❖ Also, We have to create a file inside the folder views, the file is ‘event_view.xml, inside this file, we will define the menu and the view.
  • 14. ❖ So let us look at how to create an XML file and the menu first. ❖ Here, in the event_view.xml file we have defined two menus, one menu is the main menu named ‘Event Management’ and under that menu, we have created another menu named ‘Event’.
  • 15. ❖ So now on clicking the menu, some action has to take place. So let us look at how the action can be defined. After defining the action it should be given to the menu.
  • 16. ❖ Now we have defined the action for the menu, if you look at the previous code, you can see that in the res_model we have given the name of the table we have created in the event.py file, that means on clicking the menu the action is going to this model.In the view mode, we have specified the views as tree and form. We have got many other views like kanban, pivot, calendar, etc. But here we are using only tree and form.Now let us link the above-created action to the menu ‘events’.
  • 17. ❖ Now our event_view.xml will be like this,
  • 18. ❖ Now let us stop defining the view here and add this view to the manifest file that we have created earlier. Inside the manifest file, you can see a tag data in that you have to add this file. ❖ As the event_view.xml is inside the views folder when specifying the path in the manifest file. Also added the security file in the ‘manifest’ file. So now the manifest file will be like this,
  • 19. ❖ Now just restart your odoo service and activate the developer mode and click on the Apps -> Update Apps List -> Update.
  • 20. ❖ Once you click the Update button, search for the module that we have created now, either you can search using the folder name, which is called the technical name of the module, in our case the technical name of the module we have created is event management and the name of the module is the name we have given inside the manifest file which is also Event Management.
  • 21. ❖ Now we can Install the module by clicking the Install button and see what happens. After a few seconds loading the module will get installed, if it successfully installed it will redirect to home screen else it will show up an error message. For it installed successfully, to ensure it, come back to apps menu and search our module and see its status.
  • 22. ❖ Now, you can see the menu named Event Management.
  • 23. ❖ Click on the Event Management menu, you can see a submenu named Event Management.
  • 24. ❖ Here you can create your first event record.
  • 25. For More Details Check our company website for related blogs and Odoo book. Odoo Book V15 Check our YouTube channel for functional and technical videos in Odoo. How to Build Custom Module in Odoo 15
  • 26.