Web Timer Widget - Live Duration Field for Odoo
by Steven Marp https://apps.odoo.com/apps/browse?repo_maintainer_id=512936$ 13.98
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 559 |
| Technical Name |
sm_web_timer_widget |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/browse?repo_maintainer_id=512936 |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 559 |
| Technical Name |
sm_web_timer_widget |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/browse?repo_maintainer_id=512936 |
| Versions | 18.0 19.0 |
Web Timer Widget
Live HH:MM:SS duration widget for any Odoo 19 form
Key Features
1 Live Timer DisplayShow elapsed time directly on an Odoo form as hours : minutes : seconds. The value updates every second while the record is open, without refreshing the page. |
Real-time HH:MM:SS counter |
|
Start field with built-in controls |
2 Start Field TimerPoint the widget to a start datetime field. The timer runs live from that value. Use the built-in Start, Stop, and Reset controls directly from the widget interface. |
3 Final Duration StoragePlace the widget on a float, integer, char, or text field. Keep duration available for reporting, billing, or SLA analysis while users monitor elapsed time in real time. |
Store hours, minutes, seconds, or HH:MM:SS |
|
Runs smoothly across reloads |
4 State PersistenceThe timer remembers its state via Local Storage! You can start the timer, navigate away from the form, close the tab, or refresh the page, and the timer will resume ticking exactly where it left off when you return. |
5 Developer ConfigurationHighly customizable frontend component. Easily configure features via XML options: show or hide controls, toggle the clock icon, set different units (hours, minutes, seconds), and define a custom empty label. |
Configurable options in any custom view |
How It Works
|
1
Set StartWhen the configured start datetime has a value, the timer begins. |
2
Watch LiveThe widget recalculates elapsed time every second from the datetime values. |
3
Reset AnytimeStart from your configured datetime, stop to store the final duration, and reset whenever you need a new cycle. |
Example XML
<field name="duration_hours"
widget="sm_web_timer"
options="{'start_field': 'timer_start'}"/>
Use widget="sm_web_timer" on your duration field. The compatibility alias widget="web_timer_widget" is also available.
Technical Note
This module provides a reusable widget component. Start, Stop, and Reset controls are handled in the widget frontend so it can be reused in any model with a start datetime field.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module