| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) |
| Lines of code | 466 |
| Technical Name |
scopysoft_product_cost_tracking |
| License | OPL-1 |
| Versions | 16.0 17.0 |
Product Cost
Tracking
Never wonder again who changed your product cost, when they changed it, or why. A complete, automatic audit trail — built right into Odoo.
Everything you need to audit cost changes
Install once, and every future cost change is automatically captured with full context — no extra setup required.
Full Audit Trail
Every change to the standard_price field is recorded automatically, including old value, new value, timestamp, and the user who made the change.
Origin Detection
Automatically identifies where the change came from — manual entry, imports, scheduled actions, purchase orders, manufacturing, and more.
Difference Calculation
Instantly shows the cost difference in both absolute value and percentage, so you can immediately spot significant price movements.
Linked to Products
Access the full cost history directly from the product form view with a single click. History available on both templates and variants.
Multi-Company Ready
Tracks the company context on every record. Works correctly in multi-company Odoo setups out of the box.
Export Friendly
All tracked data is stored in standard Odoo records, meaning you can filter, group, and export cost history to Excel with built-in Odoo tools.
Real screenshots from a live database
This is exactly what you get after installing — no mock-ups, no demo data.
📍 Step 1 — Cost Changes smart button on the product form (More dropdown)
📍 Step 2 — Inventory → Configuration → Product Cost Tracking — where all recorded cost changes are listed
📊 Step 3 — Full audit trail showing Manual, Import, Scheduled Action and Compute from BoM origins
Simple by design
No configuration needed. The module hooks into Odoo's write mechanism and silently logs every cost change in the background.
Install the module
Install via the Odoo App Store. No extra settings, no configuration wizards. It works immediately on install.
Cost changes are tracked automatically
Any time standard_price is updated — whether by a user, a scheduled action, an import, or another module — a tracking record is created.
View history from the product
Once cost changes are recorded, a smart button appears on the product showing the total number of changes. Click it to see the full history filtered to that product.
Access centrally from Inventory
All cost tracking records are also accessible under Inventory → Configuration → Product Cost Tracking for a company-wide overview.
Every record stores
Each tracking entry is a full Odoo record with these fields, searchable, filterable, and exportable.
| Field | Description | Type |
|---|---|---|
| old_cost | Cost value before the change | Float |
| new_cost | Cost value after the change | Float |
| cost_difference | Absolute difference (new − old) | Float (computed) |
| cost_difference_percent | Percentage change | Float (computed) |
| user_id | User who triggered the change | Many2one |
| origin | Source of the change (see below) | Char |
| company_id | Company context at time of change | Many2one |
| create_date | Exact date and time of change | Datetime |
| notes | Optional manual notes field | Text |
Knows where every change came from
The module uses multi-level detection — context, active model, and call stack inspection — to correctly label the source of every change.
| Origin | When it appears |
|---|---|
| Manual | User typed a new cost directly in the product form |
| Import | Cost updated via CSV or Excel file import |
| Scheduled Action | A cron job or server action changed the cost |
| Button Action | A button click triggered the cost update — including validating a Purchase Order receipt, which counts as a button click in Odoo |
| Mass Update | Multiple products updated in one operation |
| Purchase Module | Cost updated automatically by the purchase module in the background without user interaction |
| Manufacturing Order | Cost updated during production |
| Inventory Module | Cost updated via inventory valuation |
| Compute from BoM | Cost recalculated from Bill of Materials |
| Initial Cost | Cost set when the product was first created |
| Automated Process | Non-web background process |
| Custom Origin | Set explicitly via cost_tracking_origin context key |
Clean, safe implementation
Built following Odoo best practices. No external dependencies, no overrides of core views, no data loss risk.
- Inherits
product.productandproduct.template— no core model modification - Uses
write()override with duplicate-prevention context flag_cost_tracking_done - Tracking records created via
sudo()to ensure no permission errors regardless of user role - Precision-aware comparison using
float_comparewith Product Price decimal precision - Multi-level origin detection: context → active model → call stack inspection
- Helper methods available for other modules:
update_cost_from_purchase(),update_cost_from_inventory(), etc. - Explicitly set any custom origin via context:
.with_context(cost_tracking_origin='My Origin') - Depends only on
productandstock— no additional module requirements - License: OPL-1 (Odoo Proprietary)
Common questions
Does it track historical changes before installation?
No. The module begins tracking from the moment it is installed. Any cost changes that happened before installation are not captured — only future changes are logged.
Will it slow down my Odoo instance?
No. The tracking logic only runs when standard_price is part of a write operation. For all other writes to product records, there is zero overhead.
Does it work with product variants?
Yes. Cost history is tracked at the product variant level (product.product) and linked to the parent template (product.template). You can view history from either.
Why doesn't the smart button show on my product?
The smart button only appears after at least one cost change has been recorded for that product. On a fresh install, change any product's cost and save — the button will appear immediately.
Can I delete tracking records?
Yes. Tracking records are standard Odoo records. Users with appropriate permissions can delete individual records. We recommend restricting this via access rights in production.
What happens if a product is deleted?
Tracking records use ondelete='cascade' — if the product is deleted, its cost tracking records are automatically deleted as well.
Why does my Purchase Order receipt show as "Button Action"?
When you click the Validate button on a purchase receipt, Odoo registers the trigger as a Button Action — because you literally clicked a button. This is accurate. The important data is all captured: which product changed, the old cost, the new cost, who did it, and when. "Purchase Module" origin only appears when Odoo's purchase module updates cost fully in the background without any user clicking anything — which is rare in standard Odoo setups.
How do I contact support?
Email us at opeyemiajetunmobi9@gmail.com and we will respond within 1–2 business days.
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