The Data Access Problem
Your Odoo database contains answers to every business question — how much revenue did we generate last quarter, which products are selling faster than forecast, who are our most profitable customers, what invoices are overdue. But accessing this data requires knowing Odoo's domain filter syntax, understanding model relationships, or writing SQL. Most business users cannot do either, so they wait for reports that may not exist or ask developers to write custom queries.
An AI agent eliminates this barrier by translating plain English questions into precise Odoo ORM queries and returning formatted answers in seconds.
How Natural Language Queries Work
1. Simple Data Retrieval
# User asks:
"How many sales orders did we get this month?"
# AI translates to:
self.env['sale.order'].search_count([
('date_order', '>=', '2026-03-01'),
('date_order', '<', '2026-04-01'),
('state', 'in', ['sale', 'done'])
])
# AI responds:
"You received 234 confirmed sales orders in March 2026.
That's up 12% from February (209 orders)."
# User follows up:
"What's the total value?"
# AI translates to:
orders = self.env['sale.order'].search([
('date_order', '>=', '2026-03-01'),
('date_order', '<', '2026-04-01'),
('state', 'in', ['sale', 'done'])
])
total = sum(orders.mapped('amount_total'))
# AI responds:
"Total value: $487,200. Average order value: $2,082."2. Complex Multi-Model Queries
# User asks:
"Show me our top 10 customers by revenue this year
who haven't ordered in the last 30 days."
# AI breaks this into steps:
# Step 1: Find customers with revenue this year
# Step 2: Filter by no orders in last 30 days
# Step 3: Sort by revenue, limit 10
# AI translates to ORM operations:
from datetime import date, timedelta
cutoff = date.today() - timedelta(days=30)
year_start = date(2026, 1, 1)
# Get all customers with 2026 orders
order_lines = self.env['sale.order.line'].read_group(
[('order_id.date_order', '>=', year_start),
('order_id.state', 'in', ['sale', 'done'])],
['order_id.partner_id', 'price_subtotal:sum'],
['order_id.partner_id'],
orderby='price_subtotal desc'
)
# Filter: no recent orders
# ... (additional filtering logic)
# AI responds:
"Top 10 customers by 2026 revenue with no orders
in last 30 days:
1. TechBuild Corp — $67,200 (last order: Feb 18)
2. GlobalMfg Inc — $45,800 (last order: Feb 22)
3. BuildRight Solutions — $38,400 (last order: Feb 5)
..."3. Financial Questions
# User asks:
"What's our accounts receivable aging?"
# AI queries account.move.line with date analysis:
"Accounts Receivable Aging — March 23, 2026
Current (0-30 days): $145,200 (42%)
31-60 days: $89,400 (26%)
61-90 days: $67,800 (19%)
Over 90 days: $45,600 (13%)
Total outstanding: $348,000
Largest overdue (90+ days):
OldCo Industries: $18,400 (invoice from Nov 2025)
SlowPay Corp: $12,300 (invoice from Dec 2025)"
# User follows up:
"Send me this as a PDF every Monday."
# AI creates scheduled action + QWeb reportQuery Types Supported
| Category | Example Questions |
|---|---|
| Sales | Revenue by month, top products, win rates |
| Inventory | Stock levels, reorder needs, turnover |
| Finance | AR/AP aging, cash position, P&L summary |
| HR | Headcount, leave balances, overtime hours |
| CRM | Pipeline value, conversion rates, lead sources |
| Purchase | Vendor spend, PO status, price trends |
Safety and Access Control
# AI respects user permissions:
"Query: 'Show me all employee salaries'
User: john.doe (Sales Manager)
Access check: hr.employee salary fields
Result: ACCESS DENIED
AI responds: 'You don't have permission to view
salary information. This data is restricted to
HR Managers and above.'
Note: The AI never bypasses access rights.
It runs queries as the requesting user,
applying all record rules and field permissions."Disambiguation
When a question is ambiguous, the AI agent asks for clarification rather than guessing. "Show me revenue" could mean confirmed sales orders, posted invoices, or received payments. The agent asks: "Do you mean booked revenue (confirmed orders), invoiced revenue, or collected revenue (payments received)?" This prevents incorrect data from being presented as fact.
Learning User Preferences
Over time, the AI agent learns how each user thinks about data. When the CFO asks about "revenue," they mean posted invoices. When the sales manager asks about "revenue," they mean confirmed order amounts. The AI remembers these preferences and applies them automatically, asking for clarification only when context is truly unclear.
Conversational Follow-Ups
Natural language queries are not one-shot. Users explore data conversationally — starting broad and drilling down. The AI maintains context across the conversation: "Show me sales by region" followed by "Break that down by product category" followed by "Just the top 3 products in the Eastern region." Each follow-up refines the previous query without starting over.
DeployMonkey AI Natural Language Queries
DeployMonkey's AI agent lets you query your Odoo database in plain English. Ask any business question and get an instant, formatted answer — with full respect for access rights and data accuracy. No SQL, no domain filters, no developer tickets. Just ask.