Run SQL reports in Odoo without a developer
Standard Odoo reports can’t answer every ad-hoc question, and direct database access is risky. An in-Odoo SQL Explorer lets you run SQL in Odoo safely — read-only, permissioned, and instant — so analysts build custom SQL reports themselves instead of waiting on a developer.
By Arpit — Founder & Owner, KSROlabs · July 2026 · 8 min read
The problem: your data is in Odoo, but the answer isn’t
Every business running Odoo hits the same wall eventually. Someone in finance or operations needs a specific number — margin by product category last quarter, invoices missing a tax code, orders stuck in draft for more than a week — and Odoo’s built-in reports simply don’t have that view. The standard reports are predefined for common processes; they were never designed to answer every ad-hoc question a real business asks.
So the request becomes a ticket. A developer is briefed, a custom report is scoped, and the answer arrives days or weeks later — by which point the question has often moved on. The alternative many teams reach for is worse: handing someone direct access to the PostgreSQL database. That means shared credentials, the risk of an accidental UPDATE or DELETE on production, and no audit trail of who ran what.
The root issue is that the people who know the questions rarely have a safe, governed way to query the Odoo database themselves. They’re stuck between a reporting engine that can’t answer them and raw database access that’s too dangerous to hand out.
The solution: a safe, in-Odoo SQL Explorer
The right answer is to let power users run read-only SQL queries from inside Odoo itself — no exports, no external BI tool, no shared database passwords. That is exactly what SQL Explorer Pro, the Odoo SQL query tool from KSROlabs, provides. It adds a SQL editor directly to the Odoo UI, executes queries against your Odoo PostgreSQL database, and turns the results into charts, exports, and saved reports.
Because the editor lives inside Odoo and respects Odoo user groups, you get the flexibility of raw SQL with the guardrails of the ERP: read-only execution, permissioned access, and audit logging. An analyst writes a query, runs it, and downloads a spreadsheet — all without a developer and without touching production data.
How SQL Explorer Pro works
The module hooks into the standard Odoo database layer, so every standard and custom model is available to query. Four things make it practical for real, day-to-day reporting:
- In-Odoo SQL editor. A rich editor with syntax highlighting runs SELECT statements against your Odoo PostgreSQL database and shows results instantly — no leaving the ERP, no CSV round-trip.
- Read-only by default. Query execution uses read-only database connections, so an Odoo SQL query can report on data but cannot accidentally modify or delete it on a production instance.
- Saved and scheduled queries. Save frequently used queries, share them across the team, and schedule them to deliver results by email or file on a daily, weekly, or monthly cadence.
- Export and visualise. Turn results into bar, line, or pie charts inside Odoo, or export any query result to CSV or Excel with one click.
A typical query is simple to read. Here is a generic sales-by-month report you might save and schedule:
SELECT
DATE_TRUNC('month', so.date_order) AS month,
COUNT(*) AS orders,
SUM(so.amount_total) AS total_revenue
FROM sale_order so
WHERE so.state = 'sale'
GROUP BY 1
ORDER BY 1 DESC;
Run it once for an answer, save it as a reusable report, or schedule it to land in the finance inbox every morning — all from inside Odoo.
Getting started — four steps
1. Install SQL Explorer Pro from the Odoo App Store
Install the KSROlabs SQL Explorer Pro module from the Odoo App Store on your Odoo 16.0+ instance, Community or Enterprise. The module adds a SQL Explorer menu inside Odoo with no disruption to your existing data or configuration.
2. Grant access to the right user groups
Assign the SQL Explorer access group to power users, analysts, or administrators. The editor stays invisible to regular Odoo users, so only authorised team members can write and run queries.
3. Open the in-Odoo SQL editor and write a query
Open the query editor, which runs directly against your Odoo PostgreSQL database with syntax highlighting. Write a read-only SELECT statement against standard or custom models — sale.order, account.move, stock.quant, or your own tables.
4. Run, save, and export the results
Run the query to see results instantly, visualise them as bar, line, or pie charts, and export to CSV or Excel. Save frequently used queries so the whole team can reuse them, and schedule them to deliver reports by email on a cadence.
What teams build with it
Once analysts can query the Odoo database directly, the backlog of “can you just pull me the numbers for…” requests clears itself. Common uses include:
📈
Ad-hoc reporting
Answer one-off questions from management the same day — revenue by region, top products by margin, orders stuck in a specific state — without briefing a developer or waiting on a sprint.
✅
Data validation
Find duplicate contacts, invoices missing a tax code, or orders with mismatched totals by querying the Odoo database directly, so you catch data quality issues before they reach a report.
💰
Finance analysis
Join account.move and account.move.line to build aged-receivable views, cash-flow summaries, or custom P&L cuts that Odoo’s standard report engine cannot produce.
📦
Inventory analysis
Query stock.quant and stock.move to surface slow-moving SKUs, negative stock, or reorder candidates across warehouses in a single custom SQL report.
🔗
Cross-model joins
Combine sales, CRM, and custom module data in one query — the kind of complex join across multiple models that predefined Odoo views were never built to handle.
🗂️
Reusable report library
Save and share queries so an analyst writes the SQL once and the rest of the team runs it on demand, turning ad-hoc requests into a governed, repeatable report catalogue.
Safety and governance
Read-only execution. Queries run over read-only database connections by default, so there is no path to an accidental write, update, or delete against your production Odoo database. Reporting stays reporting.
Access control by user group. The SQL editor is gated behind Odoo user groups. You expose it to analysts, finance leads, and administrators while keeping it completely invisible to regular Odoo users — and it never hands database credentials to end users.
Auditability. Query executions are logged, so you always have a record of who ran what. That combination — read-only, permissioned, logged — is what makes handing out SQL access to your team safe rather than risky.
Frequently asked questions
Can I run SQL queries in Odoo?
Yes. With the KSROlabs SQL Explorer Pro module you can run an Odoo SQL query directly inside the ERP. It adds an in-Odoo SQL editor that executes statements against your Odoo PostgreSQL database, so you can query Odoo database tables — standard and custom models alike — without exporting data or wiring up an external BI tool. Results appear instantly and can be charted, saved, or exported.
Do I need a developer to build custom reports?
No. That is the point of an Odoo SQL report builder: an analyst, finance lead, or administrator who knows basic SQL can write a SELECT statement and get an answer immediately, instead of raising a ticket and waiting on a development sprint. For questions Odoo’s standard reports cannot answer, running SQL in Odoo removes the developer from the loop entirely for read-only reporting.
Is it safe and read-only?
Yes. SQL Explorer Pro uses read-only database connections by default for query execution, which prevents accidental data modification on a production Odoo database. Access is governed by Odoo user groups, so only authorised team members can open the SQL editor, and query executions are logged for audit. The module does not expose database credentials to end users, so you get ad-hoc query power without direct, risky database access.
Can I export or save reports?
Yes. Any query result can be exported to CSV or Excel (XLSX) with one click for offline analysis or sharing. You can also save frequently used queries and share them across your Odoo team, so a query written once becomes a reusable report anyone authorised can run. Saved queries can be scheduled to run automatically and deliver results by email or file on a configurable cadence.
Does it work with Odoo Online / self-hosted?
SQL Explorer Pro works with both Odoo Community and Odoo Enterprise on Odoo 16.0 and above, because it uses the standard Odoo ORM and PostgreSQL access layer that is identical across editions. It runs on self-hosted, Odoo.sh, and other managed deployments. Note that Odoo Online (odoo.com SaaS) restricts custom modules, so SQL Explorer Pro is best suited to Community, Enterprise self-hosted, and Odoo.sh environments — contact us if you are unsure about your hosting.
How much does it cost and how do I get it?
SQL Explorer Pro is a paid module available on the Odoo App Store as a one-time purchase. Free setup support is included, so we help you install it, configure the access groups, and get your first custom SQL reports running for your environment. See the product page or contact us to get started.
What you needSQL Explorer Pro for Odoo
Available on the Odoo App Store for Odoo 16.0+ — Community and Enterprise. An in-Odoo SQL query builder with read-only execution, built-in chart visualisation, CSV and Excel export, saved and scheduled queries, and access control by user group. Free setup support is included with every purchase.
Ready to answer your own Odoo questions?
We’ll install SQL Explorer Pro, set up your access groups, and get your first custom SQL reports running. Free setup support included.