AI Computed Fields & Studio in Odoo 20: Zero-Code LLM Enriched Workflows
In traditional ERP software development, enriching business records with computed logic always required writing custom Python code.
If a sales manager wanted a lead prioritized based on the text of an inbound email, or a customer support director wanted tickets tagged with sentiment and urgency, a Python developer had to write an @api.depends compute method, parse text with basic regex, or integrate custom third-party machine learning APIs.
In Odoo 20, Odoo S.A. bridges the gap between natural language reasoning and relational database fields with the introduction of AI Computed Fields (ai_fields) and their visual integration into Odoo Studio (web_studio_ai_fields).
For the first time, business analysts and citizen developers can define fields whose values are calculated dynamically using large language model prompts—without writing a single line of backend Python code.
Here is an architectural guide to how AI Computed Fields work under the hood, how to configure them safely in Odoo Studio, and how to avoid the common performance and cost traps.
1. What Are AI Computed Fields in Odoo 20?
In standard Odoo models, a computed field calculates its value by executing Python instructions defined in a method.
In Odoo 20, an AI Computed Field calculates its value by passing record data and a natural language instruction to an LLM:
Record Data (e.g., Lead Email Body, Budget, Industry)
│
▼
Prompt Template: "Analyze the lead inquiry. Return a score
from 1-100 based on purchase intent and classify as Hot/Warm/Cold."
│
▼
Odoo 20 LLM Inference Gateway (iap.odoo.com or /mcp)
│
▼
Output Parsed & Persisted: score = 85, classification = "Hot"
Because the output is typed (Selection, Integer, Float, Boolean, or Text), the resulting AI evaluation behaves like any other native field in Odoo—allowing you to filter, group by, sort, and trigger automated server actions based on AI findings.
2. 3 High-Impact Enterprise Use Cases
AI Computed Fields are not meant for mathematical formulas (like calculating tax sums or multiplying hours by hourly rates). They are engineered for qualitative data transformation:
A. Intelligent Lead Scoring & Intent Classification (CRM)
- The Problem: Inbound contact form inquiries arrive with messy paragraph text. Sales reps waste hours reading tire-kicker messages before discovering high-value commercial inquiries.
- The AI Field: A Selection field (
Hot,Warm,Nurture,Spam) computed from the inquiry message body and budget field. - The Prompt:
“Analyze the customer’s project description and stated timeframe. If they mention an active deployment within 60 days with a clear budget, return ‘Hot’. If inquiring generally about pricing, return ‘Warm’. If soliciting services, return ‘Spam’.”
B. Automated Helpdesk Urgency & Sentiment Triage
- The Problem: Frustrated enterprise clients submit support tickets with urgent operational blockers, but tickets sit in a general triage queue until manually reviewed.
- The AI Field: An Integer field (
urgency_score, 1 to 5) and a Selection field (sentiment:Positive,Neutral,Frustrated,Critical). - The Automation: High-urgency tickets (
urgency_score >= 4) automatically trigger an automated SMS alert to the on-call support manager.
C. Multilingual Vendor Bill Line Normalization (Accounting)
- The Problem: Global procurement teams receive vendor bills in multiple languages (German, Arabic, French) with obscure component part codes.
- The AI Field: A normalized English product category description generated from the foreign-language invoice line item text.
3. Configuration Walkthrough in Odoo Studio
Configuring an AI Computed Field in Odoo 20 Studio takes less than three minutes:
- Activate Odoo Studio: Open the target model (e.g. CRM Leads or Helpdesk Tickets) and click the Studio icon in the top navigation bar.
- Add a New Field: Drag and drop your desired field type (e.g. Selection or Char) onto the form view.
- Toggle “AI Computed”: In the field properties sidebar, toggle the Computed via AI switch.
- Define the Context & Prompt:
- Select the source fields the LLM should inspect (e.g.
description,partner_name,contact_name). - Write your natural language prompt specifying exact output formats.
- Select the source fields the LLM should inspect (e.g.
- Set Storing Rules: Check the Stored (
store=True) checkbox (see critical architectural warning below). - Save & Close: Odoo Studio automatically registers the field in the database catalog.
4. Architectural Guardrails: Preventing Performance & Cost Disaster
While AI Computed Fields are powerful, they represent a significant financial and database performance hazard if misconfigured:
┌────────────────────────────────────────────────────────────────────────┐
│ CRITICAL ARCHITECTURE RULE │
│ │
│ NEVER define an AI Computed Field with `store=False`. │
│ │
│ If `store=False`, Odoo recalculates the AI prompt EVERY TIME a user │
│ opens a List View, Kanban Board, or Report. Browsing 500 records in │
│ a list view will trigger 500 synchronous external LLM API calls, │
│ freezing the user interface and exhausting monthly token budgets. │
└────────────────────────────────────────────────────────────────────────┘
Best Practice Checklist for AI Fields:
- Always Set
store=True: Ensure the computed value is calculated once and saved to the PostgreSQL database table. - Define Strict Recompute Triggers: Configure the field to recompute only when specific source fields change (e.g. only re-evaluate sentiment if the
message_idschatter updates). - Use Discrete Selection Outputs: When asking an LLM to classify records, configure the field as a Selection field rather than free-form Char. This prevents minor wording variations from breaking downstream filter views.
- Batch Background Queueing: For high-volume models (thousands of records imported via CSV), trigger AI field computations asynchronously via background scheduled actions (
ir.cron) rather than synchronously blocking user save operations.
🤖 Customizing Odoo with Studio and Custom Addons?
Custom Studio fields and automated actions frequently create database locking issues or break during major version migrations. Zenithonsoft inspects your custom architecture in 24 hours under our 18-point NDA:
👉 Request a Free Odoo Architecture & Code Review →
5. Pricing & Unit Economics of Studio AI Fields
How do AI Computed Fields affect your monthly invoice?
- When using Odoo’s cloud inference, each evaluation deducts In-App Purchase (IAP) micro-credits based on the prompt and response token size.
- For typical classification tasks (under 300 input tokens and 10 output tokens), the cost is less than $0.001 per record evaluation.
- Evaluating 1,000 inbound CRM leads per month costs approximately $1.00 in IAP credits—an extraordinary return on investment compared to manual human triage.
For organizations processing hundreds of thousands of records, you can route evaluations through Odoo 20’s native Model Context Protocol (/mcp) server directly to self-hosted local models (e.g. Llama 3 on Ollama) for zero incremental cost.
Frequently Asked Questions (FAQ)
What is an AI Computed Field in Odoo 20?
An AI Computed Field is a database field whose value is generated dynamically by an AI model evaluating a natural language prompt against the data of that record. It is configured directly inside Odoo Studio without writing Python code.
Can non-technical users create AI Computed Fields?
Yes. Business analysts with Odoo Studio access can create, configure, and modify AI Computed Fields directly through the visual drag-and-drop form editor.
What happens if the AI service is temporarily offline?
If external inference times out, Odoo logs a non-blocking warning, preserves the last stored database value, and queues the record for re-evaluation during the next automated background retry job without disrupting regular user workflows.
Can you trigger automated actions based on AI field outputs?
Yes. Because AI Computed Fields are standard typed fields in the Odoo ORM, you can use them in standard Automated Actions (base.automation)—for example, automatically assigning a high-urgency ticket to a senior engineer or emailing an account manager when a lead is tagged ‘Hot’.
Summary
Odoo 20 AI Computed Fields represent a massive evolution in low-code ERP automation. By enabling prompt-driven logic inside Odoo Studio, business teams can automate complex qualitative classifications that previously required expensive custom development.
When configured with proper storage rules (store=True) and structured output bounds, AI fields deliver enterprise-grade intelligence at predictable, fractional costs.
Scale Intelligent Odoo Automations with Zenithonsoft
Looking to deploy AI workflows across your Odoo database safely and cost-effectively?
- Free 24h Odoo Code Review: Audit your custom addons and Studio customizations for performance bottlenecks before upgrading.
- Odoo Advisory & Health Check: Structured evaluation of your business automations, ERP architecture, and AI token economics.
- Odoo Engineering Services: Custom AI agent workflows, private MCP integrations, and high-performance ERP tuning.
- Book a Free Discovery Call: Speak directly with a senior Odoo solution architect.
