SlideShare a Scribd company logo

Composition of a Module in Odoo 16

C
C
Celine GeorgeCybrosys Technologies

The most important thing while developing a module is its structure. When we create a module, it has its own structure, and we should always make sure that we follow the module structure.

Composition of a Module in Odoo 16

1 of 11
Download to read offline
Composition of a Module in
Odoo 16
The most important thing while developing a module is its
structure. When we create a module, it has its own
structure, and we should always make sure that we follow
the module structure. A module consists of different
components such as models, views, security, etc.Mainly an
Odoo module is declared by its manifest.
• Each module requires a python file and a manifest file that are __init__.py file and
__manifest__.py file. The basic structure of the module is given below.
• __init__ .py
A module is also a Python package that consists of __init__ .py file that includes import
instructions for the module's numerous Python files. For example, if the module has a single
pythonfile.py file, then its __init__.py file contains:
from . import python file
• __manifest__.py
We can describe the name of the module, author name, version, description, company,
category, etc., in the manifest.
➔ Name - Name of the module.
➔ Description - Brief description of the module.
➔ Version- Here, we can specify the module version.
➔ License - Specify the distribution license
➔ Author - Author name of the module.
➔ Website - Module author’s website URL.
➔ Category - Specify the category name.
➔ Depends - specify the list of modules that must installed before installing the module.
➔ Data - With the installation of the module, these files are installed or updated.
➔ Demo - In active demonstration mode, the data files that are installed or updated.
➢ The module has directories.
➢ models
➢ views
➢ demos
➢ static
➢ security
➢ data
➢ wizards, etc.
Ad

Recommended

Module Structure in Odoo 16
Module Structure in Odoo 16Module Structure in Odoo 16
Module Structure in Odoo 16Celine George
 
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
 
Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)sroo galal
 
How to Build Custom Module in Odoo 15
How to Build Custom Module in Odoo 15How to Build Custom Module in Odoo 15
How to Build Custom Module 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
 

More Related Content

Similar to Composition of a Module in Odoo 16

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
 
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
 
1 cs xii_python_file_handling text n binary file
1 cs xii_python_file_handling text n binary file1 cs xii_python_file_handling text n binary file
1 cs xii_python_file_handling text n binary fileSanjayKumarMahto1
 
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
 
Structuring and packaging your python project
Structuring and packaging your python projectStructuring and packaging your python project
Structuring and packaging your python projectEyal Trabelsi
 
Data Files In Odoo 16
Data Files In Odoo 16Data Files In Odoo 16
Data Files In Odoo 16Celine George
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshopamptiny
 
Advanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automationsecurityxploded
 
jb_Modules_in_Python.ppt
jb_Modules_in_Python.pptjb_Modules_in_Python.ppt
jb_Modules_in_Python.pptloliktry
 
Modules and packages in python
Modules and packages in pythonModules and packages in python
Modules and packages in pythonTMARAGATHAM
 
Information management systems
Information management systemsInformation management systems
Information management systemsm_rturnage
 
Using Python Libraries.pdf
Using Python Libraries.pdfUsing Python Libraries.pdf
Using Python Libraries.pdfSoumyadityaDey
 

Similar to Composition of a Module in Odoo 16 (20)

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
 
Python Session - 5
Python Session - 5Python Session - 5
Python Session - 5
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 
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
 
1 cs xii_python_file_handling text n binary file
1 cs xii_python_file_handling text n binary file1 cs xii_python_file_handling text n binary file
1 cs xii_python_file_handling text n binary file
 
Python modules
Python modulesPython modules
Python modules
 
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...
 
Structuring and packaging your python project
Structuring and packaging your python projectStructuring and packaging your python project
Structuring and packaging your python project
 
Python libraries
Python librariesPython libraries
Python libraries
 
Python modules
Python   modulesPython   modules
Python modules
 
AtoM feature development
AtoM feature developmentAtoM feature development
AtoM feature development
 
Data Files In Odoo 16
Data Files In Odoo 16Data Files In Odoo 16
Data Files In Odoo 16
 
Python
Python Python
Python
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshop
 
Advanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing AutomationAdvanced Malware Analysis Training Session 5 - Reversing Automation
Advanced Malware Analysis Training Session 5 - Reversing Automation
 
jb_Modules_in_Python.ppt
jb_Modules_in_Python.pptjb_Modules_in_Python.ppt
jb_Modules_in_Python.ppt
 
Modules and packages in python
Modules and packages in pythonModules and packages in python
Modules and packages in python
 
Information management systems
Information management systemsInformation management systems
Information management systems
 
Using Python Libraries.pdf
Using Python Libraries.pdfUsing Python Libraries.pdf
Using Python Libraries.pdf
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
 

More from Celine George

New Features in the Odoo 17 Sales Module
New Features in  the Odoo 17 Sales ModuleNew Features in  the Odoo 17 Sales Module
New Features in the Odoo 17 Sales ModuleCeline George
 
Subscription Pause Cancel in Odoo 17
Subscription Pause Cancel in Odoo 17Subscription Pause Cancel in Odoo 17
Subscription Pause Cancel in Odoo 17Celine George
 
How To Create Calendar View In Odoo 16
How To Create Calendar View In Odoo 16How To Create Calendar View In Odoo 16
How To Create Calendar View In Odoo 16Celine George
 
Model Attribute - _description
Model Attribute - _descriptionModel Attribute - _description
Model Attribute - _descriptionCeline George
 
Model Attribute - _transient
Model Attribute - _transientModel Attribute - _transient
Model Attribute - _transientCeline George
 
Model Attribute - _order
Model Attribute - _orderModel Attribute - _order
Model Attribute - _orderCeline George
 
Down Payments In Odoo 16 Sales
Down Payments In Odoo 16 SalesDown Payments In Odoo 16 Sales
Down Payments In Odoo 16 SalesCeline George
 
How to empty an One2many field in Odoo
How to empty an One2many field in OdooHow to empty an One2many field in Odoo
How to empty an One2many field in OdooCeline George
 
Configure Project in Odoo 16
Configure Project in Odoo 16Configure Project in Odoo 16
Configure Project in Odoo 16Celine George
 
Model Constraints In Odoo 16
Model Constraints In Odoo 16Model Constraints In Odoo 16
Model Constraints In Odoo 16Celine George
 
Quick Tips in Odoo 16
Quick Tips in Odoo 16Quick Tips in Odoo 16
Quick Tips in Odoo 16Celine George
 
Model Fields in Odoo 16
Model Fields in Odoo 16Model Fields in Odoo 16
Model Fields in Odoo 16Celine George
 
How to Add a Store Attribute to a Field in Odoo 16
How to Add a Store Attribute to a Field in Odoo 16How to Add a Store Attribute to a Field in Odoo 16
How to Add a Store Attribute to a Field in Odoo 16Celine 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 16 Advanced Features
Odoo 16 Advanced FeaturesOdoo 16 Advanced Features
Odoo 16 Advanced FeaturesCeline George
 
Odoo 15 Payoll Webinar Slide
Odoo 15 Payoll Webinar SlideOdoo 15 Payoll Webinar Slide
Odoo 15 Payoll Webinar SlideCeline George
 
Name Search() Function in Odoo 16
Name Search() Function in Odoo 16Name Search() Function in Odoo 16
Name Search() Function in Odoo 16Celine George
 
Model Constraints - SQL Constraints Odoo 16
Model Constraints - SQL Constraints Odoo 16Model Constraints - SQL Constraints Odoo 16
Model Constraints - SQL Constraints Odoo 16Celine George
 
Odoo Building a website _ For the browser
Odoo Building a website _ For the browserOdoo Building a website _ For the browser
Odoo Building a website _ For the browserCeline George
 
Basic Views in Odoo 16
Basic Views in Odoo 16Basic Views in Odoo 16
Basic Views in Odoo 16Celine George
 

More from Celine George (20)

New Features in the Odoo 17 Sales Module
New Features in  the Odoo 17 Sales ModuleNew Features in  the Odoo 17 Sales Module
New Features in the Odoo 17 Sales Module
 
Subscription Pause Cancel in Odoo 17
Subscription Pause Cancel in Odoo 17Subscription Pause Cancel in Odoo 17
Subscription Pause Cancel in Odoo 17
 
How To Create Calendar View In Odoo 16
How To Create Calendar View In Odoo 16How To Create Calendar View In Odoo 16
How To Create Calendar View In Odoo 16
 
Model Attribute - _description
Model Attribute - _descriptionModel Attribute - _description
Model Attribute - _description
 
Model Attribute - _transient
Model Attribute - _transientModel Attribute - _transient
Model Attribute - _transient
 
Model Attribute - _order
Model Attribute - _orderModel Attribute - _order
Model Attribute - _order
 
Down Payments In Odoo 16 Sales
Down Payments In Odoo 16 SalesDown Payments In Odoo 16 Sales
Down Payments In Odoo 16 Sales
 
How to empty an One2many field in Odoo
How to empty an One2many field in OdooHow to empty an One2many field in Odoo
How to empty an One2many field in Odoo
 
Configure Project in Odoo 16
Configure Project in Odoo 16Configure Project in Odoo 16
Configure Project in Odoo 16
 
Model Constraints In Odoo 16
Model Constraints In Odoo 16Model Constraints In Odoo 16
Model Constraints In Odoo 16
 
Quick Tips in Odoo 16
Quick Tips in Odoo 16Quick Tips in Odoo 16
Quick Tips in Odoo 16
 
Model Fields in Odoo 16
Model Fields in Odoo 16Model Fields in Odoo 16
Model Fields in Odoo 16
 
How to Add a Store Attribute to a Field in Odoo 16
How to Add a Store Attribute to a Field in Odoo 16How to Add a Store Attribute to a Field in Odoo 16
How to Add a Store Attribute to a Field in Odoo 16
 
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 16 Advanced Features
Odoo 16 Advanced FeaturesOdoo 16 Advanced Features
Odoo 16 Advanced Features
 
Odoo 15 Payoll Webinar Slide
Odoo 15 Payoll Webinar SlideOdoo 15 Payoll Webinar Slide
Odoo 15 Payoll Webinar Slide
 
Name Search() Function in Odoo 16
Name Search() Function in Odoo 16Name Search() Function in Odoo 16
Name Search() Function in Odoo 16
 
Model Constraints - SQL Constraints Odoo 16
Model Constraints - SQL Constraints Odoo 16Model Constraints - SQL Constraints Odoo 16
Model Constraints - SQL Constraints Odoo 16
 
Odoo Building a website _ For the browser
Odoo Building a website _ For the browserOdoo Building a website _ For the browser
Odoo Building a website _ For the browser
 
Basic Views in Odoo 16
Basic Views in Odoo 16Basic Views in Odoo 16
Basic Views in Odoo 16
 

Recently uploaded

Practical Research 1: Qualitative Research and Its Importance in Daily Life.pptx
Practical Research 1: Qualitative Research and Its Importance in Daily Life.pptxPractical Research 1: Qualitative Research and Its Importance in Daily Life.pptx
Practical Research 1: Qualitative Research and Its Importance in Daily Life.pptxKatherine Villaluna
 
Different types of animal Tissues DMLT .pptx
Different types of animal Tissues DMLT .pptxDifferent types of animal Tissues DMLT .pptx
Different types of animal Tissues DMLT .pptxPunamSahoo3
 
skeletal system details with joints and its types
skeletal system details with joints and its typesskeletal system details with joints and its types
skeletal system details with joints and its typesMinaxi patil. CATALLYST
 
Sudden Death of Beliefs
Sudden Death of BeliefsSudden Death of Beliefs
Sudden Death of BeliefsRay Poynter
 
FILIPINO 7 IKATLO AT IKAAPAT NA LINGGO 3RD QUARTER.pptx
FILIPINO 7 IKATLO AT IKAAPAT NA LINGGO 3RD QUARTER.pptxFILIPINO 7 IKATLO AT IKAAPAT NA LINGGO 3RD QUARTER.pptx
FILIPINO 7 IKATLO AT IKAAPAT NA LINGGO 3RD QUARTER.pptxmarielouisemiranda1
 
Exit Essay - Save the Filipino Language by Renz Perez.docx
Exit Essay - Save the Filipino Language by Renz Perez.docxExit Essay - Save the Filipino Language by Renz Perez.docx
Exit Essay - Save the Filipino Language by Renz Perez.docxMYDA ANGELICA SUAN
 
Intuition behind Monte Carlo Markov Chains
Intuition behind Monte Carlo Markov ChainsIntuition behind Monte Carlo Markov Chains
Intuition behind Monte Carlo Markov ChainsTushar Tank
 
DISCOURSE: TEXT AS CONNECTED DISCOURSE
DISCOURSE:   TEXT AS CONNECTED DISCOURSEDISCOURSE:   TEXT AS CONNECTED DISCOURSE
DISCOURSE: TEXT AS CONNECTED DISCOURSEMYDA ANGELICA SUAN
 
The Ministry of Utmost Happiness by Arundhati Roy
The Ministry of Utmost Happiness by Arundhati RoyThe Ministry of Utmost Happiness by Arundhati Roy
The Ministry of Utmost Happiness by Arundhati RoyTrushali Dodiya
 
ACTIVIDAD DE CLASE No 1 - SOPA DE LETRAS
ACTIVIDAD DE CLASE No 1 - SOPA DE LETRASACTIVIDAD DE CLASE No 1 - SOPA DE LETRAS
ACTIVIDAD DE CLASE No 1 - SOPA DE LETRASMaria Lucia Céspedes
 
mean stack mean stack mean stack mean stack
mean stack mean stack  mean stack  mean stackmean stack mean stack  mean stack  mean stack
mean stack mean stack mean stack mean stackNuttavutThongjor1
 
The Institutional Origins of Canada’s Telecommunications Mosaic
The Institutional Origins of Canada’s Telecommunications MosaicThe Institutional Origins of Canada’s Telecommunications Mosaic
The Institutional Origins of Canada’s Telecommunications MosaicUniversity of Canberra
 
50 ĐỀ THI THỬ TỐT NGHIỆP THPT TIẾNG ANH 2024 CÓ GIẢI CHI TIẾT - GIỚI HẠN KHO...
50 ĐỀ THI THỬ TỐT NGHIỆP THPT TIẾNG ANH 2024 CÓ GIẢI CHI TIẾT - GIỚI HẠN KHO...50 ĐỀ THI THỬ TỐT NGHIỆP THPT TIẾNG ANH 2024 CÓ GIẢI CHI TIẾT - GIỚI HẠN KHO...
50 ĐỀ THI THỬ TỐT NGHIỆP THPT TIẾNG ANH 2024 CÓ GIẢI CHI TIẾT - GIỚI HẠN KHO...Nguyen Thanh Tu Collection
 
Website Fixer-Upper Series to Boost your Online Presence
Website Fixer-Upper Series to Boost your Online PresenceWebsite Fixer-Upper Series to Boost your Online Presence
Website Fixer-Upper Series to Boost your Online PresenceSamantha Russell
 
English 7-Quarter 3-Module 3-FACTORS THAT MAY INFLUENCE LITERATURE.pptx
English 7-Quarter 3-Module 3-FACTORS THAT MAY INFLUENCE LITERATURE.pptxEnglish 7-Quarter 3-Module 3-FACTORS THAT MAY INFLUENCE LITERATURE.pptx
English 7-Quarter 3-Module 3-FACTORS THAT MAY INFLUENCE LITERATURE.pptxRusselMartinezPagana
 
Narrative Exploration of New Categories at Mondelēz
Narrative Exploration of New Categories at MondelēzNarrative Exploration of New Categories at Mondelēz
Narrative Exploration of New Categories at MondelēzRay Poynter
 
2.15.24 Making Whiteness -- Baldwin.pptx
2.15.24 Making Whiteness -- Baldwin.pptx2.15.24 Making Whiteness -- Baldwin.pptx
2.15.24 Making Whiteness -- Baldwin.pptxMaryPotorti1
 
Evaluation and management of patients with Dyspepsia.pptx
Evaluation and management of patients with Dyspepsia.pptxEvaluation and management of patients with Dyspepsia.pptx
Evaluation and management of patients with Dyspepsia.pptxgarvitnanecha
 
Unleashing the Power of AI Tools for Enhancing Research, International FDP on...
Unleashing the Power of AI Tools for Enhancing Research, International FDP on...Unleashing the Power of AI Tools for Enhancing Research, International FDP on...
Unleashing the Power of AI Tools for Enhancing Research, International FDP on...Dr. Vinod Kumar Kanvaria
 

Recently uploaded (20)

Practical Research 1: Qualitative Research and Its Importance in Daily Life.pptx
Practical Research 1: Qualitative Research and Its Importance in Daily Life.pptxPractical Research 1: Qualitative Research and Its Importance in Daily Life.pptx
Practical Research 1: Qualitative Research and Its Importance in Daily Life.pptx
 
Different types of animal Tissues DMLT .pptx
Different types of animal Tissues DMLT .pptxDifferent types of animal Tissues DMLT .pptx
Different types of animal Tissues DMLT .pptx
 
skeletal system details with joints and its types
skeletal system details with joints and its typesskeletal system details with joints and its types
skeletal system details with joints and its types
 
Sudden Death of Beliefs
Sudden Death of BeliefsSudden Death of Beliefs
Sudden Death of Beliefs
 
FILIPINO 7 IKATLO AT IKAAPAT NA LINGGO 3RD QUARTER.pptx
FILIPINO 7 IKATLO AT IKAAPAT NA LINGGO 3RD QUARTER.pptxFILIPINO 7 IKATLO AT IKAAPAT NA LINGGO 3RD QUARTER.pptx
FILIPINO 7 IKATLO AT IKAAPAT NA LINGGO 3RD QUARTER.pptx
 
Time-Honored Wisdom: African Teachings for VUCA Leaders
Time-Honored Wisdom: African Teachings for VUCA LeadersTime-Honored Wisdom: African Teachings for VUCA Leaders
Time-Honored Wisdom: African Teachings for VUCA Leaders
 
Exit Essay - Save the Filipino Language by Renz Perez.docx
Exit Essay - Save the Filipino Language by Renz Perez.docxExit Essay - Save the Filipino Language by Renz Perez.docx
Exit Essay - Save the Filipino Language by Renz Perez.docx
 
Intuition behind Monte Carlo Markov Chains
Intuition behind Monte Carlo Markov ChainsIntuition behind Monte Carlo Markov Chains
Intuition behind Monte Carlo Markov Chains
 
DISCOURSE: TEXT AS CONNECTED DISCOURSE
DISCOURSE:   TEXT AS CONNECTED DISCOURSEDISCOURSE:   TEXT AS CONNECTED DISCOURSE
DISCOURSE: TEXT AS CONNECTED DISCOURSE
 
The Ministry of Utmost Happiness by Arundhati Roy
The Ministry of Utmost Happiness by Arundhati RoyThe Ministry of Utmost Happiness by Arundhati Roy
The Ministry of Utmost Happiness by Arundhati Roy
 
ACTIVIDAD DE CLASE No 1 - SOPA DE LETRAS
ACTIVIDAD DE CLASE No 1 - SOPA DE LETRASACTIVIDAD DE CLASE No 1 - SOPA DE LETRAS
ACTIVIDAD DE CLASE No 1 - SOPA DE LETRAS
 
mean stack mean stack mean stack mean stack
mean stack mean stack  mean stack  mean stackmean stack mean stack  mean stack  mean stack
mean stack mean stack mean stack mean stack
 
The Institutional Origins of Canada’s Telecommunications Mosaic
The Institutional Origins of Canada’s Telecommunications MosaicThe Institutional Origins of Canada’s Telecommunications Mosaic
The Institutional Origins of Canada’s Telecommunications Mosaic
 
50 ĐỀ THI THỬ TỐT NGHIỆP THPT TIẾNG ANH 2024 CÓ GIẢI CHI TIẾT - GIỚI HẠN KHO...
50 ĐỀ THI THỬ TỐT NGHIỆP THPT TIẾNG ANH 2024 CÓ GIẢI CHI TIẾT - GIỚI HẠN KHO...50 ĐỀ THI THỬ TỐT NGHIỆP THPT TIẾNG ANH 2024 CÓ GIẢI CHI TIẾT - GIỚI HẠN KHO...
50 ĐỀ THI THỬ TỐT NGHIỆP THPT TIẾNG ANH 2024 CÓ GIẢI CHI TIẾT - GIỚI HẠN KHO...
 
Website Fixer-Upper Series to Boost your Online Presence
Website Fixer-Upper Series to Boost your Online PresenceWebsite Fixer-Upper Series to Boost your Online Presence
Website Fixer-Upper Series to Boost your Online Presence
 
English 7-Quarter 3-Module 3-FACTORS THAT MAY INFLUENCE LITERATURE.pptx
English 7-Quarter 3-Module 3-FACTORS THAT MAY INFLUENCE LITERATURE.pptxEnglish 7-Quarter 3-Module 3-FACTORS THAT MAY INFLUENCE LITERATURE.pptx
English 7-Quarter 3-Module 3-FACTORS THAT MAY INFLUENCE LITERATURE.pptx
 
Narrative Exploration of New Categories at Mondelēz
Narrative Exploration of New Categories at MondelēzNarrative Exploration of New Categories at Mondelēz
Narrative Exploration of New Categories at Mondelēz
 
2.15.24 Making Whiteness -- Baldwin.pptx
2.15.24 Making Whiteness -- Baldwin.pptx2.15.24 Making Whiteness -- Baldwin.pptx
2.15.24 Making Whiteness -- Baldwin.pptx
 
Evaluation and management of patients with Dyspepsia.pptx
Evaluation and management of patients with Dyspepsia.pptxEvaluation and management of patients with Dyspepsia.pptx
Evaluation and management of patients with Dyspepsia.pptx
 
Unleashing the Power of AI Tools for Enhancing Research, International FDP on...
Unleashing the Power of AI Tools for Enhancing Research, International FDP on...Unleashing the Power of AI Tools for Enhancing Research, International FDP on...
Unleashing the Power of AI Tools for Enhancing Research, International FDP on...
 

Composition of a Module in Odoo 16

  • 1. Composition of a Module in Odoo 16
  • 2. The most important thing while developing a module is its structure. When we create a module, it has its own structure, and we should always make sure that we follow the module structure. A module consists of different components such as models, views, security, etc.Mainly an Odoo module is declared by its manifest.
  • 3. • Each module requires a python file and a manifest file that are __init__.py file and __manifest__.py file. The basic structure of the module is given below.
  • 4. • __init__ .py A module is also a Python package that consists of __init__ .py file that includes import instructions for the module's numerous Python files. For example, if the module has a single pythonfile.py file, then its __init__.py file contains: from . import python file
  • 5. • __manifest__.py We can describe the name of the module, author name, version, description, company, category, etc., in the manifest. ➔ Name - Name of the module. ➔ Description - Brief description of the module. ➔ Version- Here, we can specify the module version. ➔ License - Specify the distribution license ➔ Author - Author name of the module. ➔ Website - Module author’s website URL. ➔ Category - Specify the category name. ➔ Depends - specify the list of modules that must installed before installing the module. ➔ Data - With the installation of the module, these files are installed or updated. ➔ Demo - In active demonstration mode, the data files that are installed or updated.
  • 6. ➢ The module has directories. ➢ models ➢ views ➢ demos ➢ static ➢ security ➢ data ➢ wizards, etc.
  • 7. Models The model file consists of __init__.py file, which imports all python files on that model's directory. Views Views file consists of XML files for the user interface, with the actions and views like forms, lists, etc. The format of creating an XML file is “demo.xml” Data Data file contains all data files along with the module's initial data.
  • 8. Demo It consists of data files with demonstration data, which is very useful for testing, training, or module evaluation. i18n The i18n file contains the translation files, which include .po and .pot files. These files are not required to mention on the manifest file.
  • 9. • Security It consists of XML files that generate access groups and record rules for security and data files that define access control lists, such as the ir.model.access.csv file. • Controllers The Controllers folder consists of code files that provide that functionality for website controllers. • Static All assets are expanded inside the static directory. Files in this directory are public and accessible without a username and password. This directory contains JavaScript, style sheets, images, and other items that aren't listed in the module manifest but need to be referenced in the web template.
  • 10. • Wizard Wizard contains all files related to wizards. Wizards are used to holding intermediate data in Odoo. • Reports Odoo helps us to generate pdf documents such as invoices and sales orders. The report directory consists of all the files related to reports.
  • 11. Check our company website for related blogs and Odoo book. https://www.youtube.com/watch?v=sqkMIpdy7V0