odoo/enterprise#102439
Created by JavaScript, Bastien Pierre (ipb)
Blocked
- Merge method
- Review
-
CI
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- Linked pull requests
- label
- odoo-dev:master-beautiful_duration-ipb
- head
- f512058b002305d7c7e6c1c6dd32dfc95df3d4c5
| odoo/odoo | odoo/enterprise | odoo/documentation | |
|---|---|---|---|
| master | #240555 missing r+ | #102439 missing r+ | #15784 missing r+ |
[IMP] web: beautiful duration
In this commit I change the format of the durations (float_time). Now they are displayed as follow by default: 12h 30m 25s You can also specify the unit of time, like that you can specify to float_time what value it's reading. For example, if the unit of time is "minutes" and that you give it 30, it will translated to 30m. The value set to 0 are removed from the result. 0h 30m 0s => 30m
There is also a bottom popover on float_time fields that display how the typed value will be interpreted.
The format hh:mm:ss can be forced by putting the option "numeric" to true. The seconds are shown by default, they can be hide by putting the option "showSeconds" to false.