Niyu Labs Developer Tools

Text to Optimized PostgreSQL.

Generate complex Odoo SQL queries in milliseconds. The developer's copilot for reporting, data extraction, and rapid prototyping. Context-aware and schema-validated.

Live Query BuilderRead-Only

Prompt

Find customers without email created after 2023.

SQL Output

SELECT name, email FROM res_partner

WHERE email IS NULL AND create_date > ...

Schema validatedLatency: 410ms

The Problem

Stop hunting for table names.

Writing raw SQL in Odoo is painful. You have to remember if a field is on res.partner or res.users, check ir.model.fields for exact names, and manually construct JOIN clauses. The AI SQL Generator knows your database structure instantly and writes syntactically correct PostgreSQL for you.

Queries generated

12k+

Average build time

4 sec

Syntax accuracy

99.9%

Core Capabilities

The Engine.

Deterministic SQL generation, self-healing syntax, and safety guardrails.

Query lab preview
Context-Aware Generation

It knows your Database.

Generic AI tools guess table names. Our module inspects your specific Odoo instance's ir.model and ir.model.fields. It knows your custom Studio fields (x_studio), your third-party modules, and your relation types.

  • Smart Joins: Automatically handles LEFT JOIN vs INNER JOIN based on Odoo ORM definitions.
  • Field Mapping: Maps Customer Name to res_partner.name without hallucinating.
  • Version Agnostic: Writes SQL compatible with your specific PostgreSQL version.
The Self-Healing Loop

Automatic Error Correction.

Even senior devs make syntax errors. If the generated query fails execution, the module captures the PostgreSQL error message, feeds it back to the AI, and auto-generates a corrected query instantly.

  • Iterative Fixing: Detects column does not exist or ambiguous column reference errors.
  • Learning: Adapts to database constraints on the fly.
  • Execution Logs: Shows the error history and the final successful query.
Developer Scaffolding

Prototype Faster.

Use natural language to frame complex logic, then copy-paste optimized SQL into your Python code (self.env.cr.execute(...)) or Odoo Reports.

  • Raw Output: Clean, formatted SQL text ready for IDEs.
  • Complex Logic: Handles sub-queries, GROUP BY, and HAVING clauses effortlessly.
  • Performance Tuning: AI suggests indexed columns for faster retrieval.
Safety Protocols

Execution Guardrails.

Running raw SQL on production is risky. We implement strict safety checks to ensure the AI does not break your database.

  • SELECT Only: Default mode restricts UPDATE, DELETE, or DROP commands.
  • Transaction Rollback: Queries run in a safe transaction block to prevent locks.
  • Admin Control: Restrict access to specific user groups (e.g., Technical Settings).

Technical Specs

Built for fast iteration.

Schema-validated SQL generation with safety-first execution controls and export-ready results.

Compatibility

Odoo v16, v17, v18, v19 (Community & Enterprise).

Database

PostgreSQL 12+.

LLM Integration

Provider: OpenAI (Bring Your Own Key). Models: GPT-4o, GPT-4o-mini.

Privacy

Schema metadata + prompt only. No row data sent for training.

Interface

Built with Odoo Web Library (OWL). Responsive and fast.

Export

CSV / Excel export of query results.

SQL architecture preview
Query Pipeline
Schema introspection layer
SQL compiler + validator
Self-healing error loop
Read-only execution guardrails
Safety: SELECT-only mode with transaction rollback and audit logs.

Use Cases

SQL help on demand.

From migrations to custom modules, the AI SQL Generator speeds up every workflow.

The Backend Developer

I hate writing complex joins for QWeb reports. Now I just type 'Join Sale Order Line with Product Template and get total weight', copy the SQL, and paste it into my module.

The Data Migration Specialist

I use it to validate data during migration. 'Show me all partners without an email address created after 2023'. It saves me writing throwaway scripts.

The Support Engineer

When a client asks 'Why is this number wrong?', I use the AI SQL tool to dig into the raw tables and find the discrepancy in seconds.

Pricing & Deployment

Your SQL Copilot.

Stop looking up field names. Start writing logic.