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

Module: Products & Pricelists

Entity: product.template

Compute Method: _compute_currency_id

Inputs Method Outputs
main_company = self.env['res.company']._get_main_company()
for template in self:
            template.currency_id = template.company_id.sudo().currency_id.id or main_company.currency_id.id

Back to entity