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

Module: Employees

Entity: hr.version

Compute Method: _compute_is_current

View 19.0 View 20.0
Inputs Method Outputs
  • date_start
  • date_end
- today = fields.Date.today()
+ today = fields.Date.context_today(self)
for version in self:
            version.is_current = version.date_start <= today and (not version.date_end or version.date_end >= today)
  • is_current

Back to entity