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

Module: Project timesheet time control

Entity: account.analytic.line

Compute Method: _compute_show_time_control

Inputs Method Outputs
"""Decide when to show time controls."""
for one in self:
            if one.employee_id not in self.env.user.employee_ids:
                one.show_time_control = False
            elif one.unit_amount or not one.date_time:
                one.show_time_control = "resume"
            else:
                one.show_time_control = "stop"

Back to entity