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

Module: Time Off

Entity: hr.leave

Compute Method: _compute_last_several_days

View 18.0 View 20.0
Inputs Method Outputs
  • number_of_days
  • request_date_from
  • request_date_to
for holiday in self:
-             holiday.last_several_days = holiday.number_of_days > 1
+             # an end before its start is a request half edited
+             holiday.last_several_days = holiday.request_date_from and holiday.request_date_to \
+                                         and holiday.request_date_to > holiday.request_date_from
  • last_several_days

Back to entity