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

Module: MRP Account Project

Entity: mrp.production

Compute Method: _compute_has_analytic_account

Inputs Method Outputs
  • project_id
  • project_id.id
has_analytic_account_per_project_id = {p.id: bool(p._get_analytic_accounts()) for p in self.project_id}
for production in self:
            production.has_analytic_account = has_analytic_account_per_project_id.get(production.project_id.id, False)

Back to entity