Currently, when the unit amount of line is zero and the timer time
spent on entry is less than one minutes then entries are unlinked
once the timer is stopped and due to that the entry disappear from the
kanban view and traceback is generated.
After this commit, we fix the issue by preventing the deletion of
entries by setting options 'prevent_deletion' on widget so we should
no allow to delete the entry if the option is set on widget.
closes odoo/odoo#50395
Taskid: 2230155
Closes: #49128
X-original-commit: 64b9a9b4deaee5a8139b0afbe3f222a476a038f9
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose
=======
The timer mechanism is already existing on timesheet.
We would like to introduce it on helpdesk.ticket too, and
probably on other models afterward.
On the other hand, only one timer can be launched on a single
timesheet currently, shared amongst the different users.
This commit introduced a new mixin on which
- Each user can launch a timer on each record of the models
inheriting the mixin.
- Launching a new timer on a record pauses the timer of the
user that could be already running.
- The mixin brings methods to start/stop/pause/resume the
timer, that could be overridden to implement a specific
behavior for the related model, for example create a
timesheet entry.
TaskID: 2149450