Odoo ERP Basics Tutorial for Developers
This Odoo ERP basics tutorial focuses on what you need as a developer: running Odoo locally, creating a custom module, defining models and fields, adding views and menus, and wiring a small end-to-end flow across ERP apps. Instead of clicking around the UI, we will write real code and XML, so you can plug Odoo into your existing stack.
In this Odoo tutorial you will:
- Understand Odoo’s modular architecture and add-ons
- Run an Odoo development instance with a custom add-ons path
- Create a minimal custom module with a manifest
- Define a simple model and fields in Python
- Add list and form views plus a menu item
- See how this connects to accounting, CRM and inventory flows
For more context, you can combine this guide with the
Python data engineering tutorial,
SQL basics tutorial,
MariaDB tutorial for developers,
Linux basics for developers,
and e-commerce content like the
Adobe Commerce Magento 2 tutorial.
1. Odoo ERP building blocks
Odoo is a modular ERP: everything lives in apps (modules) that can depend on each other. The same patterns repeat across CRM, Sales, Inventory, Accounting and custom apps you build.
- Modules – Python packages with a manifest and models, views, security rules and data.
- Models – Python classes (extending
models.Model) backed by database tables. - Views – XML definitions for tree (list), form, kanban, graph and other UI layouts.
- Menus and actions – define how users navigate to views.
In this Odoo ERP basics tutorial, we will create a tiny app called jscriptz_task that tracks internal technical tasks and links nicely into the existing ERP navigation.
2. Run Odoo in a local dev environment
The easiest way to follow along is to run Odoo in Docker with a bind-mounted custom add-ons directory. This keeps your code under version control alongside other services.
2.1 Basic docker-compose example
Create a docker-compose.yml in a fresh folder:
version: "3.9"
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: odoo
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
volumes:
- db_data:/var/lib/postgresql/data
odoo:
image: odoo:17
depends_on:
- db
ports:
- "8069:8069"
environment:
HOST: db
USER: odoo
PASSWORD: odoo
volumes:
- ./odoo-extra-addons:/mnt/extra-addons
volumes:
db_data:
2.2 Start Odoo and log in
docker compose up -d
# then open http://localhost:8069 in your browser
Complete the initial database setup wizard. Once the main dashboard loads, you can start installing apps like CRM and Sales, or go straight to custom development in odoo-extra-addons.
3. Create an Odoo custom module
Now this Odoo ERP basics tutorial moves into code. You will create a minimal module called jscriptz_task that adds a simple task model and basic UI.
3.1 Module structure
Inside odoo-extra-addons/, create the module folder and some subdirectories:
mkdir -p odoo-extra-addons/jscriptz_task/models
mkdir -p odoo-extra-addons/jscriptz_task/views
Your module will include at least:
__manifest__.py– metadata and dependenciesmodels/task.py– Python model definitionviews/task_views.xml– list and form views plus menus
3.2 Manifest file
Create odoo-extra-addons/jscriptz_task/__manifest__.py:
# -*- coding: utf-8 -*-
{
"name": "Jscriptz Task Management",
"summary": "Simple internal task tracking for developers",
"version": "16.0.1.0.0",
"author": "Jscriptz",
"website": "https://jscriptz.com",
"category": "Productivity",
"depends": ["base"],
"data": [
"views/task_views.xml",
],
"installable": True,
"application": True,
}
This tells Odoo which apps your module depends on and which XML files to load.
4. Define an Odoo model and fields
Next, this Odoo ERP basics tutorial defines a very small model that maps to a database table. You will add a name, description, stage and deadline.
4.1 Python model class
Create odoo-extra-addons/jscriptz_task/models/task.py:
# -*- coding: utf-8 -*-
from odoo import models, fields
class JscriptzTask(models.Model):
_name = "jscriptz.task"
_description = "Jscriptz Internal Task"
name = fields.Char(string="Title", required=True)
description = fields.Text(string="Description")
stage = fields.Selection(
[
("todo", "To Do"),
("in_progress", "In Progress"),
("done", "Done"),
],
string="Stage",
default="todo",
)
deadline = fields.Date(string="Deadline")
Every field declaration adds a column in the underlying table when you update the module.
4.2 Init file
Ensure models are imported by creating odoo-extra-addons/jscriptz_task/models/__init__.py:
# -*- coding: utf-8 -*-
from . import task
5. Add views and menus for the model
Odoo’s UI is driven by XML view definitions. In this part of the Odoo ERP basics tutorial you will add a list view, a form view and a menu entry.
5.1 XML views
Create odoo-extra-addons/jscriptz_task/views/task_views.xml:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_jscriptz_task_tree" model="ir.ui.view">
<field name="name">jscriptz.task.tree</field>
<field name="model">jscriptz.task</field>
<field name="arch" type="xml">
<tree string="Tasks">
<field name="name"/>
<field name="stage"/>
<field name="deadline"/>
</tree>
</field>
</record>
<record id="view_jscriptz_task_form" model="ir.ui.view">
<field name="name">jscriptz.task.form</field>
<field name="model">jscriptz.task</field>
<field name="arch" type="xml">
<form string="Task">
<sheet>
<group>
<field name="name"/>
<field name="stage"/>
<field name="deadline"/>
</group>
<group>
<field name="description"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_jscriptz_task" model="ir.actions.act_window">
<field name="name">Tasks</field>
<field name="res_model">jscriptz.task</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="menu_jscriptz_root"
name="Jscriptz"
sequence="10"/>
<menuitem id="menu_jscriptz_task"
name="Tasks"
parent="menu_jscriptz_root"
action="action_jscriptz_task"
sequence="20"/>
</odoo>
This gives you a “Jscriptz → Tasks” menu item with a basic list and form interface for the jscriptz.task model.
5.2 Update the app list and install
Restart the Odoo container and update the apps list from the Odoo UI. Search for “Jscriptz Task Management”, install it, then open the Jscriptz menu. You should be able to create tasks, move them between stages and set deadlines.
6. Small Odoo ERP flow summary
To summarize this Odoo ERP basics tutorial, here is a small table that shows how your custom module fits into a broader ERP scenario:
| Layer | Odoo Object | Example | Role | Relative Impact |
|---|---|---|---|---|
| Database | Table | jscriptz_task |
Stores internal task records | |
| Model | models.Model |
JscriptzTask |
Defines fields and Python behavior | |
| View | Tree & form | view_jscriptz_task_tree |
Lets users see and edit tasks | |
| Navigation | Menu | Jscriptz → Tasks | Exposes the feature in the UI |
Once you are comfortable with these layers, you can extend this Odoo ERP basics tutorial into more advanced work: linking tasks to sales orders, adding automated actions, integrating with external services via Python, or syncing data into analytics pipelines built with Spark, Flink or ClickHouse.


