psql_query_run_ui

SQL Query Manager | Execute Raw PostgreSQL Queries, Save Results & Export to Excel

Raw SQL Query Executor | PostgreSQL Query Management, Saved Queries & Excel Export

Description:

This module empowers database administrators and technical users to execute raw PostgreSQL queries directly from a highly polished Odoo UI dashboard. By default, running direct SQL queries requires backend server access or external database management tools like pgAdmin. With this module, authorized users can write code in a fully featured syntax-highlighted editor, securely execute statements, view results in a dark-mode developer terminal, and manage a reusable library of saved query templates entirely within the Odoo interface.

Purpose of the Module:

The purpose of this module is to provide technical teams with a secure, all-in-one workspace to interact directly with the Odoo PostgreSQL database without leaving the application. By integrating a backend query generator with modern developer tools, users can extract custom data, perform administrative updates, and track query history effortlessly.

This helps organizations troubleshoot technical issues instantly, extract complex data on the fly, optimize developer speed via point-and-click copy-paste mapping, and maintain a clear audit trail of all manual database interventions.

Main Features

  • Dual-Pane Code Workspace:
  • Features a modern side-by-side developer layout separating your input editor directly from your output visualization window for a seamless coding experience.
  • Syntax-Highlighted Editor:
  • Replaces plain text entry with an integrated code widget displaying structured lines, distinct keyword highlights, and auto-indentation behaviors.
  • Styled Developer Terminal:
  • Displays execution feedback, structural exception logs, and performance metrics inside a custom dark console viewport featuring distinct cyan monospace fonts
  • Saved Query Library:
  • Easily load saved queries from a dropdown, or save your currently written query as a brand-new saved query directly from the execution screen without navigating away.
  • Smart Clipboard Assistants & SQL Formatting:
  • Look up specific Odoo Model and Field names with native copy-to-clipboard widgets. Model names are automatically formatted with underscores (e.g., sale_order instead of sale.order) for instant, error-free SQL copy-pasting.
  • Instant Excel Export:
  • Automatically generates and downloads a cleanly formatted Excel (.xls) file containing the exact output of your queries, avoiding manual data extraction.
  • Execution Confirmation Wizard:
  • Applies a strict safety layer by prompting a confirmation popup before any query is processed, helping to prevent accidental data manipulation.
  • Error Handling & Rollback:
  • Intelligently catches database exceptions and syntax errors, displaying the exact PostgreSQL error message in the terminal while rolling back the transaction to prevent system crashes.
  • Query Result Logs:
  • Tracks every executed query automatically in a dedicated history log. It records the query string, execution timestamp, the user who ran it, and the success or error message.
  • Strict Access Control:
  • Secures the entire tool behind a dedicated "Run SQL Query" user group, ensuring that only authorized administrators and developers can access the workspace.

Scope of the Module

The SQL Query Generator module extends Odoo's technical capabilities by incorporating deep developer analytics and direct database interaction tools into the system settings.

Module Scope Includes:

  • Information Visibility:
    • Display structured data outputs, impacted record metrics, and syntax error messages inside an isolated terminal interface.
    • Show technical model tables and field properties side-by-side using dedicated clipboard-ready tab panels.
    • Track historical data logs across a localized model storage archive.
  • Technical Support:
    • Enable developers to analyze complex database relationships without relying on external software.
    • Speed up system debugging, custom module testing, and data migrations with reusable saved queries.
  • Database Control:
    • Protect against typing errors by enforcing clear, copy-pasteable data definitions.
    • Reduce manual data extraction time by downloading query output straight to Excel.
    • Help prevent accidental data loss or corruption through mandatory confirmation prompts and transaction rollbacks.

Business Benefits:

  • Efficiency:
    • Drastically reduced manual lookup time when cross-referencing field types and naming styles.
    • Elimination of repetitive typing via instant query saving and loading.
    • More informed and rapid responses to critical support tickets.
  • Optimization:
    • Cleaner system insight without deploying heavy third-party monitoring utilities.
    • Better compliance and auditing through centralized execution logs.

Supported Business Verticals / Industries:

The SQL Query Manager is suitable for organizations of all sizes and industries that use Odoo and require direct database access for reporting, analysis, troubleshooting, data validation, administration, or system maintenance. Whether you are managing sales, inventory, accounting, manufacturing, CRM, HR, projects, or any other Odoo application, this module provides a powerful way to execute SQL queries, analyze data, and export results.

Check App Here

job_equipments_maintenance_request