Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: WMS Accounting

Entity: product.template

Compute Method: _compute_cost_method

View 17.0 View 19.0
Inputs Method Outputs
  • company_id
  • categ_id
+ for product_template in self:
+             company = product_template.company_id
+             if not company or self.env.company.filtered_domain([('id', 'child_of', company.id)]):
+                 company = self.env.company
+             product_template.cost_method = (
+                 product_template.categ_id.with_company(company).property_cost_method
+                 or company.cost_method
+             )
  • cost_method

Back to entity