summaryrefslogtreecommitdiff
path: root/doc/reference/javascript.rst
diff options
context:
space:
mode:
authorJosse Colpaert <jco@odoo.com>2016-10-17 16:57:45 +0200
committerJosse Colpaert <jco@odoo.com>2017-02-03 18:56:10 +0100
commit8810a34864b4ba6b7a486ce5a7f84dba6945fe16 (patch)
tree8a95a40c47d7d9271d8bacf277422206d2fb0fef /doc/reference/javascript.rst
parent2abac5c89cb43aa834594e6e3a759b58cfb67301 (diff)
[FIX] equipment: activate cron for preventive requests
The xml file with the cron that creates the recurrent preventive requests was not loaded in the system, so we needed to add it. Before, the cron was foreseen to only create the maintenance request on the day that the request was foreseen (in the morning). Now, it will create a request if none exists on the next_action_date. That way the requests can be planned for. The other problem is that the '_compute_next_maintenance' method for calculating the next_action_date does not take into account the possibly manually already created requests. So, now, the next maintenance is calculated with the closed requests and the open ones. If the first new one is in the past, it takes that date in the past. If it is in the future, it will see if the gap is big enough to put a maintenance in between the last done maintenance (or now) and the first new one. If none exists, it is today + period. That's why we have to add the 'request_date' in the depends. And take into account the preventive requests existing on an equipment.
Diffstat (limited to 'doc/reference/javascript.rst')
0 files changed, 0 insertions, 0 deletions