| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 206 |
| Technical Name |
invoice_sales_data |
| License | LGPL-3 |
| Website | https://profast.supply |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 206 |
| Technical Name |
invoice_sales_data |
| License | LGPL-3 |
| Website | https://profast.supply |
Invoice Sales Data
Track cost, revenue, and profit margins directly on customer invoices - automatically calculated from your product costs.
Key Features
Invoice-Level Tracking
See cost and profit on every customer invoice and credit note.
Partner Analytics
Total lifetime profit and average profit per sale tracked on every customer record.
Real-time Updates
Recent invoices update automatically when lines change. No manual calculation needed.
Historical Freeze
Invoices older than 7 days are frozen. Product cost changes won't affect historical data.
One-Time Compute
All historical invoices compute once on install. After that, only recent invoices recalculate.
Admin-Only Visibility
All fields require Billing Administrator role. Keep sensitive margin data private.
How It Works
Profit tracking in three simple steps
|
1
|
Install & Automatic ComputationOn install, the module computes cost/profit for ALL historical invoices. This takes 30-60 seconds for 10k invoices. After that, only recent invoices recalculate. |
|
2
|
View Invoice Sales DataOpen any customer invoice to see Cost and Profit in the Other Info tab. The Profit column appears in invoice list views with automatic totals. |
|
3
|
Analyze Customer PerformanceOpen any customer record to see Total Profit (lifetime) and Avg Profit Per Sale in the Sales & Purchase tab. Identify your most profitable customers instantly. |
Partner Sales Analytics
Lifetime analytics on every customer record
Total Profit
Lifetime net profit from all posted invoices and credit notes. Shows the true value of each customer relationship over time.
Avg Per Sale
Average profit per invoice. Excludes credit notes from the calculation to avoid artificially lowering the average. Shows typical deal profitability.
Why exclude credits from average? Credit notes inflate the transaction count and have negative profit values. Including them would artificially lower the "average profit per sale." We count only actual sales for the average, but include credits in total profit (they reduce it, as they should).
Technical Highlights
Stored Computed Fields
Uses computed fields to recalculate only when invoice lines, products, or costs change. No unnecessary processing.
Product Price Caching
On install, queries each unique product once and caches the price in memory. 100x faster than individual database queries per line item.
Bulk SQL Updates
Uses raw SQL to update 500 invoices at once instead of individual ORM writes. Dramatically reduces installation time for large datasets.
Built for Odoo 18 - profast.supply
Please log in to comment on this module