A Complete Overview of Modules in Odoo 19
#Odoo 19 #Odoo Modules #Odoo Module Overview #Odoo ERP #Odoo Development

A Complete Overview of Modules in Odoo 19

In Odoo, a module is a self-contained package that adds specific features or business functionality to the system. Every application in Odoo—such as Sales, Inventory, Accounting, HR, or CRM—is built as a module. Modules allow Odoo to remain highly modular, flexible, and easily extensible.

An Odoo module typically includes models, views, controllers, security rules, data files, and business logic, all organized within a defined directory structure. This modular architecture enables developers to install, upgrade, or remove features without affecting the core system or other modules.

Each module is identified by a __manifest__.py file, which contains essential metadata such as the module name, version, dependencies, and data files. When a module is installed, Odoo reads this manifest, creates or updates database tables through the ORM, loads views and security rules, and integrates the module into the system.

Modules can extend existing functionality by inheriting from other modules or introduce entirely new features, making Odoo suitable for businesses of all sizes and industries. This design also ensures upgrade safety, as customizations are isolated within modules rather than modifying core code.

Overall, modules are the backbone of Odoo’s extensibility, empowering businesses and developers to tailor the platform to their exact requirements while maintaining stability and scalability.

In Odoo 19, a module is used to add, modify, or extend business functionality without changing the core system. Every feature in Odoo—such as Sales, Inventory, Accounting, or HR—is delivered through modules.

Modules allow you to:

  • Add new business features (e.g., a custom CRM or MLM system)
  • Extend existing applications (Sales, Inventory, HR, etc.)
  • Customize workflows and business logic
  • Create new database models and fields
  • Design custom views, reports, and dashboards
  • Keep customizations upgrade-safe and maintainable

Because Odoo is modular, you can install or uninstall features as needed, making it flexible and scalable for any business.

How to Create a Module in Odoo (Step by Step)

1. Create the Module Directory

First, create a new folder inside your custom addons path or addons path:

custom_addons/
    └── letscms_unilevel/

2. Add the Manifest File (__manifest__.py)

This file defines the module’s metadata:

{
    'name': 'LetsCMS Unilevel',
    'version': '19.0.1.0.0',
    'category': 'Sales/CRM',
    'summary': 'Unilevel MLM Network Marketing System',
    'description': """
        Unilevel MLM Network Marketing System
        =====================================
        * Manage MLM members and network structure
        * Unilevel compensation plan
        * Commission calculations
        * Genealogy tree view
        * Member registration and management
    """,
    'author': 'LetsCMS',
    'website': 'https://www.letscms.com',
    'license': 'LGPL-3',
    'depends': [
        'base',
        'sale_management',
        'contacts',
        'product',
    ],
    'data': [
        'security/ir.model.access.csv',
        'views/admin/settings/letscms_general_settings_views.xml',
        'views/admin/actions/letscms_general_settings.xml',
        'views/admin/settings/letscms_eligibility_settings_views.xml',
        'views/admin/actions/letscms_eligibility_settings.xml',
        'views/admin/letscms_unilevel_menu.xml',
        
    ],
    'demo': [],
    'images': ['static/description/banner.png'],
    'installable': True,
    'application': True,
    'auto_install': False,
}

3. Initialize the Module (__init__.py)

Create an __init__.py file to load Python files:

    from . import models

4. Create Models

models/
├── __init__.py
└── my_model.py
    from odoo import models, fields
    class MyModel(models.Model):
        _name = 'letscms.hierarchy'
        _description = 'This is hierarchy model To store MLM hierarchy data'
        user_id = fields.Integer(string='User Id', required=True)
        child_id = fields.Integer(string='Child Id', required=True)
        level=fields.Integer(string='Level', required=True)
        postion=fields.Integer(string='Position', required=True)

5. Define Views

Create an XML file for UI views:

    <odoo>
        <record id="view_letscms_hierarchy_tree" model="ir.ui.view">
            <field name="name">letscms.hierarchy.tree</field>
            <field name="model">letscms.hierarchy</field>
            <field name="arch" type="xml">
                <tree>
                    <field name="user_id"/>
                    <field name="child_id"/>
                    <field name="level"/>
                    <field name="postion"/>
                </tree>
            </field>
        </record>
    </odoo>

6. Add Security Rules

Create security/ir.model.access.csv:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_letscms_hierarchy,letscms.hierarchy,model_letscms_hierarchy,,1,1,1,1

7. Install the Module

  • Restart the Odoo server
  • Enable Developer Mode
  • Go to Apps → Update Apps List
  • Search for your module and install it

Typical Odoo Module Structure

letscms_unilevel/
├── __manifest__.py
├── __init__.py
├── models/
├── views/
├── security/
├── data/
└── static/

Why Modules Are Important in Odoo

  • Maintain clean and upgrade-safe customizations
  • Enable modular development and easy maintenance
  • Allow reuse of features across projects
  • Support dependency-based architecture
  • Scale business functionality over time

Conclusion

Modules are the core building blocks of Odoo, enabling developers to add, customize, and extend business functionality in a clean and upgrade-safe way. By understanding how to create and use modules in Odoo 19, developers can build scalable, maintainable solutions that adapt to evolving business needs.

×
MLM PLAN
×
×