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
12 lines
565 B
XML
12 lines
565 B
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
<template id="assets_backend" name="timer assets" inherit_id="web.assets_backend">
|
|
<xpath expr="." position="inside">
|
|
<link type="text/scss" href="/timer/static/src/scss/timer_button.scss" rel="stylesheet"/>
|
|
<script type="text/javascript" src="/timer/static/src/js/timer_mixin.js"/>
|
|
<script type="text/javascript" src="/timer/static/src/js/timer.js"/>
|
|
<script type="text/javascript" src="/timer/static/src/js/timer_toggle_button.js"/>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|