Architecture of Odoo

How Odoo Works

A simple mental model for Sales & Functional Consultants

Tech StackData FlowData TypesACL
1. Tech Stack

What is Odoo built with?

User Interface, Python, ORM, and Database work together to deliver ERP functionality.

Odoo stack
πŸ–₯️
User Interface Technology: XML + OWL (JavaScript) Forms β€’ Buttons β€’ Lists β€’ Dashboards
↓
🐍
Python Purpose: Business logic Validation β€’ Workflow β€’ Automation
↓
πŸ”„
ORM Meaning: Object Relational Mapping Connects Models ↔ Database
↓
πŸ—„οΈ
Database Technology: PostgreSQL Stores Customers β€’ Orders β€’ Invoices β€’ Inventory
What each layer contributes
UI
User InterfaceMakes Odoo easy for users to operate.Forms, buttons, lists, dashboards.
PY
PythonImplements business requirements.Validation, workflow, automation, calculations.
ORM
ORMSimplifies access to business data.Connects Odoo models with the database.
DB
DatabaseKeeps reliable shared business data.One source of truth for all modules.
Each layer has one responsibility. Together they deliver a complete ERP system.
2. Data Flow

How does Odoo process my click?

MVC explains how Odoo turns one user action into a controlled business process.

MVC in Odoo β€” mapped to the Tech Stack
πŸ–₯️
ViewShows what users see and interact with: forms, buttons, lists, dashboards.
UI
↓
βš™οΈ
ControllerReceives the request from the browser and sends it to the right logic.
PY
↓
πŸ“¦
ModelApplies business rules, validations, calculations, and workflows.
PY
↓
πŸ”„
ORMTranslates business objects into database operations.
ORM
↓
πŸ—„οΈ
DatabaseStores the data and related business records.
DB
Example: Confirm Sales Order
1
View: click ConfirmThe salesperson clicks the Confirm button on the Sales Order form.
2
Controller: receive requestOdoo receives the browser request: β€œconfirm this order”.
3
Model: apply business rulesThe Sales Order model checks customer, pricing, taxes, stock logic, and workflow.
4
ORM: translate & saveThe ORM converts the business object into database operations.
5
Database: store resultPostgreSQL stores the order and related records are updated.
Sales Order Confirmed
Inventory Received
3. Data Types

How is business data organized?

Models store information using fields and relationships that mirror real-world business entities.

Common field types
πŸ“ CharShort text, like customer name
πŸ“„ TextLong notes or descriptions
πŸ”’ IntegerWhole numbers, like quantity
πŸ’² FloatDecimals, like discount %
πŸ’° MonetaryCurrency amounts, like total
πŸ“… DateOrder date or deadline
πŸ“‹ SelectionOptions, like Draft / Confirmed
βœ… BooleanYes / No, like Paid?
Example: Sales Order Total uses Monetary because it stores a currency amount.
Relationships
πŸ‘€ Customer
Many2One (M2O)
πŸ“„ Sales Order
One2Many (O2M)
πŸ“‹ Order Lines
Many2Many (M2M): Products ↔ Tags
Key message: field types store the right kind of information; relationships connect business objects together.
4. ACL

Who can see or modify data?

Security is controlled through Users, Groups, ACLs, Record Rules and Field Groups to enforce business policies.

πŸ‘€
UserWho is logging in?
↓
πŸ‘₯
GroupWhat is their role?
↓
πŸ”’
ACLWhat can they do?
↓
πŸ“„
Record RuleWhich records can they access?
↓
πŸ“„
Field GroupsWhich fields can they see?
Business example

John is a Sales User. He can create and edit quotations, but only for his own customers or sales orders.

β€’ ACL controls actions: read, create, edit, delete
β€’ Record Rules control visibility: own records or company records
β€’ Field Groups control visibility: specific fields within records
Key message: Odoo controls both what users can do and which data they can see.
Summary

Four ideas to remember

Odoo architecture is easier when we connect every technical concept to one business action.

Tech StackOdoo uses User Interface, Python, ORM, and Database to turn user actions into business data.
Data FlowA click moves through View, Controller, Model, ORM, and Database to trigger business results.
Data TypesModels, fields, and relationships organize business data.
ACLUsers, Groups, ACLs, and Record Rules protect business data.
Any question ? Please keep it yourself !
Part 2 Β· Odoo Studio & Automation

Click first.
Code only when needed.

A practical extension: how Studio, fields, and automation help consultants build small solutions directly inside Odoo.

StudioFieldsAutomationBest Practices
Studio & Automation

What will we cover?

Three practical topics, then a small exercise to prove the concept.

Build via Studio

A construction kit for screens you already use

Studio opens an edit sidebar over the live Odoo screen. No Python deployment is needed for simple UI changes.

How it feels to use
Customer
Azure Interior
Order Date
22/06/2026
+ Drop a field here
WHEN stage β†’ Done THEN email Project Manager
Studio
οΌ‹ Add field
βš™ Automation
βœ“ Approval
β–€ Report
Simple definition

Studio lets users customize views, fields, reports, and simple automations directly from the browser.

Key message: Studio is useful for fast, small, local changes. It is not a replacement for development.
Studio Capabilities

What can you do in Studio?

Studio touches six main areas. The most important for consultants are views, fields, automation, and small apps.

🧱 Views & Layout Today

  • Add, remove, or reposition fields.
  • Add tabs, groups, statusbars, or buttons.

🏷️ Fields & Data Today

  • Create text, number, date, selection, many2one, related fields.
  • Make fields required, read-only, or hidden.

βš™οΈ Automation Today

  • When X happens, do Y.
  • Add approval rules before a button can be clicked.

πŸ“„ Reports

  • Edit PDF report layout.
  • Add or remove fields, logos, and sections.

🧩 New Apps & Menus Today

  • Create a mini-app from a blank model.
  • Add menu items in existing apps.

πŸ” Filters & Search

  • Add default filters and group-by options.
  • Search using new custom fields.
Before Studio

Before you build, check what already exists

Studio should not be the first answer for every request.

1 Β· Native?
Check Odoo Apps first: Helpdesk, Field Service, Fleet, Maintenance, Documents, Sign, Subscriptions, and more.
2 Β· Apps Store
Look for official or third-party apps that already solve the problem.
3 Β· OCA
Search community modules before creating a new customization.
4 Β· Studio
If nothing fits and the need is small/local, Studio earns its place.
OCA
Middle option: Community modules can solve features that Studio cannot build, without starting full custom development.
Studio Limits

Where Studio cannot work well

Studio is powerful, so we need a clear boundary before a quick tweak becomes technical debt.

Where it cannot go
β€’ No complex business logic beyond simple conditions.
β€’ Cannot call external systems or APIs properly.
β€’ Not suitable for performance-sensitive changes.
β€’ Does not manage ACLs or Record Rules.
β€’ Easy to overuse because every change becomes permanent metadata.
Escalation path
Studio Try first
OCA Module Try second
Custom Development Escalate
Rule of thumb: Studio for small, local, cosmetic changes. Development for multi-team impact, integrations, and real business logic.
Add a Field

Field types: one palette, many business meanings

When you add a field in Studio, you are extending a model with a new piece of business data.

Text / CharNames, references, short labels
Integer / FloatQuantities, scores, percentages
MonetaryCurrency amounts with a currency field
Date / DatetimeDeadlines, appointment time, confirmation date
SelectionFixed options like Low / Medium / High
BooleanYes / No flags
Many2OneLink one record to another record
One2Many / Many2ManyConnect lists of related records
Key message: choosing the right field type makes reports, filters, and automation much easier later.
Field Configuration

Every field gets the same five important switches

Attributes define how users can interact with a field.

Common switches
β€’ Required β€” user must fill it before saving.
β€’ Read-only β€” user can see it but cannot edit it.
β€’ Invisible β€” hidden from the screen.
β€’ Placeholder / Help β€” guide users on what to enter.
β€’ Default value β€” pre-fill common information.
Business example

If a quotation is already confirmed, some fields should become read-only so users do not accidentally change important commercial data.

Visibility by Group

Not everyone needs to see every field

Studio can show or hide fields by group, but real security still belongs in Technical Settings.

Visibility example
FieldSales UserSales Manager
Customer Notes
Internal Margin
Important distinction

Hiding a field is a UI decision. It improves usability, but it is not the same as database-level security.

Use ACL and Record Rules when the requirement is real security.
Relational Fields

Fields that point to another model

Many business requirements are not just about storing data, but connecting records together.

Simple relationship map
πŸ‘€ Customer
Many2One
πŸ“„ Sales Order
One2Many
πŸ“‹ Order Lines
Many2Many: Products ↔ Tags
How to explain it
β€’ Many2One: one Sales Order has one Customer.
β€’ One2Many: one Customer has many Sales Orders.
β€’ Many2Many: many Products can have many Tags.
Automation

Rules that run themselves

Automation is where Odoo reacts automatically after records are created, updated, or scheduled.

Trigger
Something happens
β†’
Action
Odoo does something
β†’
Result
Business process continues
Automated Action

Runs when a record changes, for example when a ticket moves to a new stage.

Scheduled Action

Runs on a timer, for example every night to send reminders or update statuses.

Automation Rule

Trigger, conditions, then actions

A rule should be readable as a business sentence: when this happens, and the record matches these conditions, do this action.

ModelHelpdesk Ticket
TriggerOn update
ConditionStage is Waiting and last update is older than 2 days
ActionSend reminder email to responsible person
Domain example
[('stage_id.name', '=', 'Waiting'), ('write_date', '<', today - 2)]
Domain = filter that decides which records the rule applies to.
Automation Actions

Clicking Add an action opens the same logic every time

After Odoo finds the right records, actions decide what happens next.

Common actions
β€’ Send an email or activity.
β€’ Update a field.
β€’ Create another record.
β€’ Add a follower or notification.
β€’ Run server action for advanced cases.
Example chain
Ticket idle→Create activity→Email owner→Manager sees risk
Scheduled Action

Scheduled Action = automation on a timer

A scheduled action runs periodically, even when no user clicks anything.

When to use it
β€’ Nightly digest email.
β€’ Remind users about overdue tickets.
β€’ Sync or clean up records.
β€’ Recalculate scheduled information.
Simple memory

Automated Action reacts to a record event.

Scheduled Action runs based on time.

Event-based vs time-based automation.
Demo Scenario

Ticket idle 2 days β†’ reminder + nightly digest

This example shows how automation turns a business policy into an Odoo process.

Business requirement

If a support ticket stays idle for more than two days, remind the responsible person and include it in a nightly manager digest.

Odoo solution
Find idle tickets→Create activity→Send email→Digest list
Key message: automation helps enforce follow-up without depending on someone remembering manually.
Exercise

Build it yourselves

Two groups, one local server, one custom field and one automation each.

Group task
  • Create one useful custom field.
  • Make it visible in the right place.
  • Create one automation rule.
  • Test with a real record.
Success criteria
β€’ The field supports a real business need.
β€’ The automation has a clear trigger.
β€’ The result is easy to explain to a consultant.
Studio Summary

Three things to remember

Studio is fastUse it for small UI, field, report, and local process changes.
Fields shape dataChoose the right field type so reporting and automation work naturally.
Automation enforces processUse triggers and scheduled actions to reduce manual follow-up.
Know when to escalateUse OCA or custom development for integrations, complex logic, and multi-team impact.
Studio helps consultants prototype and deliver small business improvements faster.