OdooWiki OCA HUB
Generic Modules/Others License: AGPL-3

Allow to export data in csv files FROM sql requests. There are some restrictions in the sql query, you can only read datas. No update, deletion or creation are possible. A new sub menu named Sql Export is available in the Dashboard main menu.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets users run read-only SQL queries on Odoo data and download the results as CSV files. Queries can include user-entered parameters (dates, IDs, categories) before exporting.

This module adds a new "Sql Export" menu under the Dashboard main menu, where users can create and manage SQL export definitions. Each definition stores a read-only SQL query, a file format (CSV), CSV copy options (header, delimiter), and a text encoding such as utf-8 or windows-1252.

On the export form, buttons let you validate the query, configure properties, and execute it. If the query contains placeholders like %%(Start Date)s, the module opens a small wizard asking for those values before running the export; missing values block the export with an error. Special placeholders for the current company and current user are filled in automatically.

When executed, the query results are downloaded as a CSV file named after the export and the execution date. The system records who last ran the export and when, shown as optional columns in the list view.

Access is controlled by SQL request user and manager groups: regular users can only see exports assigned to them or to their groups, while managers can create, edit and delete export definitions. The module builds on sql.export and sql.file.wizard models and only allows reading data, never modifying it.

Depends on

spreadsheet_dashboardsql_request_abstract

Menus it adds

Sql Export
Models and fields (2)
  • sql.export · new modelencoding, file_format, copy_options, use_properties, last_execution_uid (Last execution User), last_execution_date, query_properties_definition (Query Properties)
  • sql.file.wizard · new modelfile_name, binary_file (File), sql_export_id, query_properties (Properties)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 6 confirmed, 3 with no information of 9 versions.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/server-tools.

terminal Installation and usage

OCA documentation · Odoo 18.0

Dashboards \> Sql Export

Specific use with parameters

  • %(company_id)s allows to set in the query the company id of the user
  • %(user_id)s allows to set in the query the user id
  • for any created property, you can use it with %(Property String)s syntax

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.