Replenishment cost
product_get_cost_field · OCA/margin-analysis
-
Security25/25No findings
-
Activity0/25Last human commit 141 months ago
-
Required by25/255 modules depend on it
-
Maturity12/25In 2 Odoo series since 6.1
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Migrating to 19.0: only `__manifest__.py` is recognized: a module with `__openerp__.py` is not detected at all. migration-openerp-manifest · source
product_product— Class 'product_product' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceproduct_product— Class 'product_product' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · source- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Product Replenishment Cost
Provides an overridable method on product which compute the Replenishment cost of a product. By default it just returns the value of "Cost price" field, but using the product_cost_incl_bom module, it will return the costing from the bom.
As it is a generic module, you can also setup your own way of computing the cost_price for your product.
All OCA modules to compute margins are based on it, so you'll be able to use them in your own way.
Contributors
- Alexandre Fayolle alexandre.fayolle@camptocamp.com
- Yannick Vaucher yannick.vaucher@camptocamp.com
- Joël Grand-Guillaume joel.grand-guillaume@camptocamp.com
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- product_cost_incl_bom, product_historical_margin, product_standard_margin, product_stock_cost_field_report, sale_markup
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_get_cost_field_form |
product.get_cost_field.view.form | product.product | form | Inherits product.product_normal_form_view |
product_get_cost_field_tree |
product.get_cost_field.view.tree | product.product | tree | Inherits product.product_product_tree_view |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 1
No new fields.
Public methods (1)-
get_cost_field(self, cr, uid, ids, context=None)
Loading…