693e55fc231179c83590f3f0bbd78a1413043e8b
This PR introduces a mixin, `MailTrackingDurationMixin`, that can be added to a model with a many2one field. It computes the time a record spends in each value the many2one field takes and stores it in a Json field (`duration_tracking`). The primary use is with a new field, the StatusBarDurationField (`widget='statusbar_duration'`), to compute and display the time a record has spent in each stage in the form view statusbar. This field inherits from the StatusBarField. To specify on what field the computation has to be based, the model that inherits from this mixin has to specify `_track_duration_field`. (e.g. `_track_duration_field = 'stage_id'`) Computation is based on `mail.tracking.value` messages, so tracking has to be activated for that field. In the widget, time is shown using a luxon Duration object. "narrow" specifies that time is expressed with one character and luxon takes care of translations. Here, we implement the mixin and the field for `crm.lead` and `project.task`. https://github.com/odoo/enterprise/pull/38275 implements it in `helpdesk.ticket` Task-3032773 closes odoo/odoo#108554 Related: odoo/enterprise#38275 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%