summaryrefslogtreecommitdiff
path: root/addons/project/models/project_task_recurrence.py
AgeCommit message (Collapse)Author
2021-05-10[FIX] project: incorrect creation of recurring tasksalt-odoo
In case X several recurrences are processed in the same cron execution, only the last recurring task was created X times, while the other tasks were not created. There is also a missing id preventing a correct use of the default stage for the new created task. closes odoo/odoo#70633 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-12-17[FIX] project: fix infinite recurring tasks creationVictor Feyens
for repeat_type = 'forever' recurrences. Consider a recurrence creating a task every 15th day of the month. When the cron runs, it updates the next recurrence dates of the recurrence. But currently, the updated "next_recurrence_date" can be set to an earlier date than today, if the fixed day of the recurring task is earlier than the current day. This means that the recurring task to create every 15th of the month will be created the 15, the 16, the 17, the 18, ... until the next month begins (no task will be created when the cron runs before the 15th of a month). This commit enforces the next recurrence_date to be set after the current cron run, to ensure a task isn't wrongly created multiple times. This commit also includes the tests that led to the discovery of this bug. closes odoo/odoo#63518 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-12-17[FIX] project: fix infinite recurring tasks creationVictor Feyens
For recurrences of repeat_type = 'after', the daily cron would create tasks infinitely. * The cron creates recurring task for all recurrences for which next_recurrence_date < today. * next_recurrence_date was never updated. This commit ensures that next_recurrence_date is set to False for repeat_type = 'after' recurrences, when the last recurrence is created.
2020-11-25[FIX] project: missing api.model on create overrideVictor Feyens
closes odoo/odoo#62310 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-12[IMP] project: add recurring tasksKevin Baptiste
Some interventions are done on a regular basis (e.g. maintenance of fire alarms, safety inspections). Having tasks auto-generate would facilitate the process and would ensure that the next intervention isn't missed/forgotten. closes odoo/odoo#55517 Taskid: 2172156 Related: odoo/enterprise#12246 Related: odoo/upgrade#1604 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>