SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

How to Define One2Many Field in Odoo 15
 How to Define One2Many Field in Odoo 15 How to Define One2Many Field in Odoo 15
How to Define One2Many Field in Odoo 15Celine George
 
Odoo - From v7 to v8: the new api
Odoo - From v7 to v8: the new apiOdoo - From v7 to v8: the new api
Odoo - From v7 to v8: the new apiOdoo
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for websiteOdoo
 
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
 
Odoo (OpenERP) - Creating a module
Odoo (OpenERP) - Creating a moduleOdoo (OpenERP) - Creating a module
Odoo (OpenERP) - Creating a moduleTarun Behal
 
Odoo - Smart buttons
Odoo - Smart buttonsOdoo - Smart buttons
Odoo - Smart buttonsOdoo
 
Design patterns avec Symfony
Design patterns avec SymfonyDesign patterns avec Symfony
Design patterns avec SymfonyMohammed Rhamnia
 
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
 
Tutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo FrameworkTutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo FrameworkOdoo
 
How to Define Many2one Field in Odoo 15
How to Define Many2one Field in Odoo 15How to Define Many2one Field in Odoo 15
How to Define Many2one Field in Odoo 15Celine George
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Amit Singh
 
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
 
Oracle Forms :Window and Canvases
Oracle Forms :Window and CanvasesOracle Forms :Window and Canvases
Oracle Forms :Window and CanvasesSekhar Byna
 
How to develop automated tests
How to develop automated testsHow to develop automated tests
How to develop automated testsOdoo
 
Oracle Forms-Canvas types
Oracle Forms-Canvas typesOracle Forms-Canvas types
Oracle Forms-Canvas typesSekhar Byna
 
How to remove disable an oa framework personalization (doc id 304670
How to remove  disable an oa framework personalization (doc id 304670How to remove  disable an oa framework personalization (doc id 304670
How to remove disable an oa framework personalization (doc id 304670Ahmad Mkade
 
The Odoo JS Framework
The Odoo JS FrameworkThe Odoo JS Framework
The Odoo JS FrameworkOdoo
 

La actualidad más candente (20)

How to Define One2Many Field in Odoo 15
 How to Define One2Many Field in Odoo 15 How to Define One2Many Field in Odoo 15
How to Define One2Many Field in Odoo 15
 
Odoo - From v7 to v8: the new api
Odoo - From v7 to v8: the new apiOdoo - From v7 to v8: the new api
Odoo - From v7 to v8: the new api
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for website
 
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
 
Odoo (OpenERP) - Creating a module
Odoo (OpenERP) - Creating a moduleOdoo (OpenERP) - Creating a module
Odoo (OpenERP) - Creating a module
 
Oracle Apps - Forms
Oracle Apps - FormsOracle Apps - Forms
Oracle Apps - Forms
 
Odoo - Smart buttons
Odoo - Smart buttonsOdoo - Smart buttons
Odoo - Smart buttons
 
Design patterns avec Symfony
Design patterns avec SymfonyDesign patterns avec Symfony
Design patterns avec Symfony
 
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
 
Tutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo FrameworkTutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo Framework
 
How to Define Many2one Field in Odoo 15
How to Define Many2one Field in Odoo 15How to Define Many2one Field in Odoo 15
How to Define Many2one Field in Odoo 15
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
 
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...
 
Oracle Forms :Window and Canvases
Oracle Forms :Window and CanvasesOracle Forms :Window and Canvases
Oracle Forms :Window and Canvases
 
Oaf personaliztion examples
Oaf personaliztion examplesOaf personaliztion examples
Oaf personaliztion examples
 
How to develop automated tests
How to develop automated testsHow to develop automated tests
How to develop automated tests
 
Oracle Forms-Canvas types
Oracle Forms-Canvas typesOracle Forms-Canvas types
Oracle Forms-Canvas types
 
How to remove disable an oa framework personalization (doc id 304670
How to remove  disable an oa framework personalization (doc id 304670How to remove  disable an oa framework personalization (doc id 304670
How to remove disable an oa framework personalization (doc id 304670
 
DJango
DJangoDJango
DJango
 
The Odoo JS Framework
The Odoo JS FrameworkThe Odoo JS Framework
The Odoo JS Framework
 

Similar a 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
 
Module Structure in Odoo 16
Module Structure in Odoo 16Module Structure in Odoo 16
Module Structure in Odoo 16Celine George
 
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
 
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
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with muleHasan Syed
 

Similar a 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
 
Module Structure in Odoo 16
Module Structure in Odoo 16Module Structure in Odoo 16
Module Structure in Odoo 16
 
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 - 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
 
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
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 

Más de Celine George

How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine 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
 

Más de Celine George (20)

How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
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
 

Último

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
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
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
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
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
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 

Último (20)

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
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
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
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
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
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

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.