| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Inventory (stock) • Invoicing (account) • Sales (sale_management) |
| Lines of code | 1228 |
| Technical Name |
xs_revenue_leakage_engine |
| License | OPL-1 |
| Versions | 17.0 18.0 19.0 |
Find the money you've already lost — before it becomes a habit.
Revenue Leakage Engine automatically scans your Sales, Accounting, and Inventory data every few hours and surfaces lost revenue that would otherwise slip through the cracks — uninvoiced orders, excessive discounts, below-cost sales, overdue invoices, inventory shrinkage, and refund anomalies. Every finding is quantified in your company currency, classified by severity, and linked back to the source record for one-click investigation. Built entirely inside Odoo 18. No external services. No agents. No black boxes.
Every business bleeds revenue. Most never see it.
Industry studies put revenue leakage at 1% to 5% of annual revenue, and 90% of it is invisible until month-end close — if it's caught at all. Confirmed orders never invoiced. Discounts granted above policy. Products sold below cost. Invoices 60 days overdue that nobody chased. Customers refunding more than they pay. This module finds all of it — continuously, automatically, and without you writing a single SQL query.
10 screens in 18 seconds — list, dashboards, form, kanban, pivot, filters, customer rollup, email alert, settings
Six scanners watching your revenue
Every scanner runs automatically on a schedule. Every finding is quantified, ranked, and traceable.
Order → Invoice Gap
Discount Leakage
Cost vs Sale Anomaly
Payment Overdue
Inventory Shrinkage
Credit Note Anomaly
Dashboard & Charts
Customer Aggregation
High-Severity Email Alerts
One-Click Drill-Down
Multi-Currency Normalization
Multi-Company Safe
Digest-Based Dedup
Resolve / Re-Open Workflow
Run Scan Now Button
Configurable Thresholds
Dashboards that tell the story
Leakage by type, trend over time, and customer-level rollups — all native Odoo 18 views.
Install and it just works
Four steps. No configuration required to start scanning.
Install Module
Add to addons path, update app list, install.
Tune Thresholds
Optional. Settings > Revenue Leakage.
Run First Scan
One-click manual scan or wait for cron (6h).
Recover Revenue
Review high-severity issues and resolve.
Built on Odoo 18 natively
Zero external services. Zero agents. Zero black boxes.
One-time purchase. Lifetime access.
One Odoo database | All updates included | OPL-1 License
- Order → Invoice Gap Detection
- Discount Leakage Detection
- Cost vs Sale Anomaly Detection
- Payment Overdue Detection
- Inventory Shrinkage Detection
- Credit Note / Refund Anomaly Detection
- Six-View Dashboard (List, Kanban, Form, Graph, Pivot, Search)
- High-Severity Email Alerts with Recipient Picker
- Customer Leakage Rollup (SQL View)
- Multi-Company + Multi-Currency Safe
All Features in Detail
Every capability explained — what it does and why it matters.
One form per finding — linked to the original source record, with resolve / re-open workflow.
Order → Invoice Gap
The #1 source of silent leakage.
- Flags confirmed sale orders not invoiced after N days
- Configurable delay threshold (default 30 days)
- Quantified via
amount_to_invoice - Direct drill-down to the sale order
Discount Leakage
Policy violations, quantified.
- Flags SO lines with discount above threshold
- Calculates excess-discount margin loss per line
- Configurable max discount (default 15%)
- Shows salesperson accountability patterns
Cost vs Sale Anomaly
Below-cost sales surface immediately.
- Compares line sale price vs product
standard_price - Flags margins below configurable floor (default 10%)
- Catches cost drift + pricelist stale rate issues
- Per-line quantification in company currency
Payment Overdue
Collectables turning into uncollectables.
- Scans posted
out_invoicepast due date - Filters to
not_paid/partialstates - Quantified via
amount_residual - Days-late computation built into description
Inventory Shrinkage
Every lost unit, valued at cost.
- Detects negative inventory adjustments on
stock.quant - Values shrinkage at product
standard_price - Location-aware — one record per adjustment
- Surfaces warehouse theft / damage patterns
Credit Note Anomaly
Customers with suspicious refund ratios.
- Computes refund-to-invoice ratio per partner
- Uses
_read_group— 2 queries total, not N - Configurable lookback (default 90d) + threshold (20%)
- Catches fraud, product quality, and process issues
Dashboard & Analytics
See leakage from every angle.
- Leakage by Type (pie chart)
- Leakage Trend (line chart, monthly)
- Leakage by Severity (bar chart)
- Pivot view (type × severity × amount)
Customer Leakage Rollup
Know which customers are draining you.
- SQL-backed materialized view — always fresh
- Total amount, record count, open count, high count
- List + graph views with filters
- Drives customer-level recovery workflows
High-Severity Email Alerts
Finance gets notified. Nobody else.
- Fires only on newly detected high-severity records
- Professional HTML template with CTA deep-link
- To: configured users | From: user running scan
- Master toggle + recipient picker in Settings
One-Click Drill-Down
Zero friction between detection and action.
- "Source Record" button on every leakage form
- Polymorphic link via
Many2oneReference - Jumps directly to SO / invoice / quant / partner
- Resolve / Re-open workflow with statusbar
Multi-Currency & Multi-Company
Built for international operations.
- All amounts converted to company currency
- Every scan iterates all companies
- Record rule scopes to user's allowed companies
- Severity calculated in consistent base currency
Digest Deduplication
Scan a hundred times — same results.
- MD5 hash of
model:res_id:typeper record - UNIQUE DB constraint enforces dedup
- Scans are idempotent — no email spam
- Fast pre-filter before batch create
Configurable Thresholds
Tune once. Forget forever.
- All 6 scanners have tunable thresholds
- Unified Settings page under Revenue Leakage app
- Persisted via
ir.config_parameter - Changes take effect on next scan
Role-Based Security
Two groups. Clear boundaries.
- User — read-only access to records
- Manager — resolve, configure, run scans
-
res.groups.privilege(Odoo 18 native) - Row-level rules for multi-company safety
Every view you need
List, Kanban, Form, Graph, Pivot, Search — and a professional email alert template.
Support & Custom Features
We're here to help — from installation questions to building tailored scanners.
Xpath Solutions
Have a bug to report, a question about setup, or want a custom scanner? Reach out — we respond promptly and build on demand.
xpathsolution@gmail.comConfiguration Reference
Settings > Revenue Leakage — all available options.
One settings page — tune thresholds, toggle alerts, pick recipients.
| Setting | Description | Default |
|---|---|---|
| Invoice Delay Threshold | Flag confirmed orders not invoiced after N days | 30 days |
| Maximum Discount Allowed | Flag SO lines with discount above this % | 15.0 % |
| Minimum Margin | Flag SO lines with margin below this % | 10.0 % |
| Payment Overdue Threshold | Flag invoices unpaid past N days due | 30 days |
| Refund Anomaly Threshold | Flag customers with refund ratio above this | 20.0 % |
| Refund Lookback Period | Window for refund ratio calculation | 90 days |
| Enable Email Alerts | Master toggle for high-severity alerts | Enabled |
| Alert Recipients | res.users picker — who receives emails | — |
| Cron Interval | How often the scan runs (ir.cron) | 6 hours |
Severity Thresholds
How records are automatically classified — in company currency.
Release Notes
Full changelog for Revenue Leakage Engine.
- Payment Overdue scanner — flags unpaid invoices past due
- Inventory Shrinkage scanner — values negative quants at cost
- Credit Note Anomaly scanner — partner refund ratio analysis
- Customer Leakage Summary — SQL-backed rollup view
- Email alerts for high-severity records with recipient picker
- Professional HTML mail template with CTA deep-link
- Days Open aging field with statusbar workflow
- Migrated aggregates to Odoo 18
_read_groupAPI
- Order → Invoice Gap scanner
- Discount Leakage scanner
- Cost vs Sale Anomaly scanner
- List, Kanban, Form, Graph, Pivot views
- Dashboard actions — by type, trend, severity
- Manual "Run Scan Now" action
- User & Manager security groups + record rules
- Multi-company + multi-currency support
Frequently Asked Questions
Everything you need to know before installing.
models.Constraint, _read_group with aggregates kwarg, res.groups.privilege, and expression-based invisible= syntax — all specific to Odoo 18.with_company(). All amounts are converted to the respective company currency. A record rule scopes leakage records to the user's allowed companies.ir.cron, or on-demand via "Run Scan Now" under the Actions menu. You can edit the cron interval in Settings > Technical > Scheduled Actions._read_group for server-side aggregation (2 queries, not N). Existing-digest lookup is indexed. No raw SQL that bypasses ORM security.
Built for Odoo 18.0 | OPL-1 License | xpathsolution@gmail.com
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module