[ADD] timer: New mixin to record time on models

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
This commit is contained in:
Okan SUMER (osu)
2020-02-05 16:44:37 +01:00
committed by Yannick Tivisse
parent a6d7c7b04a
commit e2b749fb7a
12 changed files with 565 additions and 0 deletions
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_timer_user,timer.timer.user,timer.model_timer_timer,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_timer_user timer.timer.user timer.model_timer_timer base.group_user 1 1 1 1