Commit Graph
2 Commits
Author SHA1 Message Date
Yannick Tivisse fd9b08c70f [FIX] timer: Fix wrong type for res_id field
Purpose
=======

Having a char field referring to an Integer could lead
to unwanted behavior if not managed correctly.

closes odoo/odoo#45393

X-original-commit: d73a86fd682495c034dfde678442f37689ecb759
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-02-14 12:27:01 +00:00
Okan SUMER (osu) e2b749fb7a [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
2020-02-05 16:44:37 +01:00