Odoo is an open-source ERP (Enterprise Resource Planning) system that provides a suite of business applications, including CRM, eCommerce, accounting, inventory, HR, and more.
It is highly modular, allowing businesses to install only the apps they need and extend functionality as required.
Key Features
Modular System: Install only the required apps.
Integrated Suite: All applications work together seamlessly.
Customizable: Supports drag-and-drop customization and developer-based modifications.
Open-source & Enterprise Versions: Open-source (free) with community support, Enterprise (paid) with advanced features.
ODOO Studio
Odoo Studio is a low-code/no-code environment that allows users to customize applications without writing code.
Key Features:
Form and Report Editor: Modify form views, reports, and layouts using drag-and-drop.
Workflow Automation: Automate processes like sending emails when an order is confirmed.
Custom Fields: Add new fields to forms and models without coding.
Menu Customization: Adjust navigation and interface elements easily.
User Role Management: Control who sees what data using role-based access control.
Limitations of Odoo Studio:
Cannot handle complex logic or advanced automation.
Limited in modifying backend database structures.
Cannot create deep integrations with external systems.
Limited ability to modify existing module code.
For advanced customizations, developers need to work with code.
History of ODOO
Odoo was founded by Fabien Pinckaers in 2005 under the name TinyERP. Over the years, it evolved into OpenERP and eventually Odoo.
2005: Released as TinyERP 1.0, focusing on small businesses.
2009: Renamed OpenERP, expanding to larger enterprises.
2014: Became Odoo, introducing modular app-based architecture.
2015: Present Continuous growth, with Odoo Enterprise for premium features.
Code-Based Customization in Odoo
Odoo uses Python (backend logic) and XML (UI views and data structure). To create advanced functionalities, developers need to work with these core components.
Add-on Module Structure
Odoo uses modules to extend its functionality. A module is a self contained package that adds new features, models, or views.
Module Directory Structure
πcustomβaddons/
πmyβmodule/: Your module folder
π__init__.py:: Python file to import models
π__manifest__.py: Manifest file (metadata)
πmodels/: Python models (database tables & business logic)
πviews/: XML files (Ul structure)
πsecurity/: Access rights & record rules
Manifest File
The __manifest__.py file is a Python dictionary that acts as the module's configuration file and contains metadata about the module.
Key Attributes:
depends: Other Odoo modules required (e.g., ['base', 'sale']).
data: Files to be loaded (e.g., views, security, demo data).
installable: Whether the module can be installed (True/False).
application: Defines whether the module should appear as a main app in Odoo.
Allows businesses to install only the necessary applications.
Enables easy customization and scalability.
Provides seamless integration between different modules.
Supports both no-code (Odoo Studio) and code-based customization (Python & XML).
Modules in Odoo
A module in Odoo is a self-contained package that adds functionality to the system. It includes models, views, security rules, and business logic.
Key Features:
A modular structure allows easy customisation.
Defined using a manifest file (__manifest__.py).
Can introduce new features or extend existing ones.
ATTRS in Odoo
In Odoo, ATTRS stands for Attributes. It is used in XML views to control the behavior of fields dynamically based on conditions. Such as hiding/showing fields or making them read-only based on conditions.
Key Features:
Applied in XML views
Supports conditions like invisible, required, read-only
ATTRS is used to dynamically control field visibility, required fields, and read-only conditions in views.
Common Attributes:
{ 'readonly': [('state', '=' 'done')] }: Makes the field read-only based on a condition.
{ 'required': [('type', '=' 'mandatory')] }: Marks the field as required dynamically.
{ 'invisible': [('field_name', '=' 'value')] }: Hides the field when a condition is met.
On-Change Events
An on-change event triggers an action when a field value changes. It is used to update dependent fields automatically.
Key Features:
Implemented in Python using @api.onchange.
Helps to update field values dynamically
@api.onchange('price'):def _onchange_price(self): if self.price: self.price_with_tax = self.price * 1.18
Views in Odoo
Odoo provides multiple views to display data in various formats.
Common Views:
Form View β For editing individual records.
Tree View β Displays multiple records in a tabular format.