Skip to Content

Odoo Module Development: Your First Module in Odoo 18

From scaffold to working module

Odoo is built to be extended with custom modules. Every customization should be a module, not a change to core code. It makes upgrades possible and keeps the system maintainable.

Scaffolding

odoo scaffold my_module /mnt/extra-addons creates the basic structure: __init__.py, __manifest__.py, models/, views/, security/. Takes three seconds and gives you a working foundation.

__manifest__.py

Module metadata: name, version, dependencies, data files, assets. Dependencies (depends) are critical: if your module extends CRM, put 'crm' in depends. Odoo installs dependencies automatically.

Models

Python classes inheriting from models.Model. Each class becomes a database table automatically. Fields are defined as class attributes: name = fields.Char(), amount = fields.Float(), partner_id = fields.Many2one('res.partner'). Relation fields (Many2one, One2many, Many2many) create links between models.

Views

XML files defining how data is displayed. Form view for single record, list view for overview, Kanban for visual board. Views are connected to models and can inherit and extend existing views with XPath.

Security

ir.model.access.csv defines which user groups can read, write, create, and delete records. Without this file, the model is invisible to everyone except admin. It's the most common mistake in module development.

Install

Update the app list (Settings → Apps → Update). Search for the module name. Install. Odoo creates tables, loads views, and configures security automatically.

Build a simple module first. Understand the ORM layer. Then you can extend virtually anything.

Odoo vs SAP and Dynamics: A Realistic Comparison
David vs Goliath, but David has grown