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

Module: Invoicing

Entity: product.template

Compute Method: _compute_valuation

Inputs Method Outputs
  • is_storable
  • company_id
  • categ_id
for product_template in self:
            if not product_template.is_storable:
                product_template.valuation = False
                continue
            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.valuation = product_template.categ_id.with_company(company).property_valuation or company.inventory_valuation

Back to entity