Skip to content

Commit 83117dc

Browse files
committed
[FIX]: Change README.rst according to OCA template
[IMP]: New module icon [ADD]: Screenshot / images to give an visual overview
1 parent 720a5eb commit 83117dc

File tree

5 files changed

+61
-47
lines changed

5 files changed

+61
-47
lines changed

web_widget_timepicker/README.rst

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,72 @@
11
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
2-
:alt: License: AGPL-3
2+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
3+
:alt: License: AGPL-3
34

4-
==============================
5-
Timepicker widget in form view
6-
==============================
75

8-
This module defines a timepicker widget, to be used with float fields
9-
or (function) fields. Use ``widget='timepicker'`` in your form view
10-
definition. It can be use as a replacement for the standard float_time widget.
6+
===============================
7+
Timepicker widget in form views
8+
===============================
119

12-
If you use the widget with a field record, the input field has the following default
13-
timepicker options:
10+
This module provides a timepicker widget for float fields.
11+
It can be used as a replacement for the standard float_time widget in form views.
1412

15-
* By default the possible selection is based on 15 minute interval (step: 15)
16-
* By default 24 hour mode with H:i format (timeFormat: 'H:i')
17-
* By default scroll selection starts at current time (scrollDefault: 'now')
1813

19-
The widget uses the jquery.timepicker plugin by Jon Thornton
14+
|picker|
15+
16+
17+
The widget has the following default timepicker options:
18+
19+
* the possible selection is based on 15 minute interval (step: 15)
20+
* 24 hour mode in H:i format (timeFormat: 'H:i')
21+
* scroll selection starts at current time (scrollDefault: 'now')
22+
23+
24+
|formview|
2025

2126

2227
Usage
2328
=====
2429

25-
This module defines a new widget type for form views input fileds.
26-
Set the attribute ``widget=timepicker`` in a ``field`` tag in a form view.
30+
In the form view declaration, put widget='timepicker' attribute in the field tag::
2731

28-
You can pass custom options through the "timepicker" field in the options attribute:
32+
...
33+
<field name="arch" type="xml">
34+
<form string="View name">
35+
...
36+
<field name="name"/>
37+
<field name="mytimefieldname" widget="timepicker"/>
38+
...
39+
</form>
40+
</field>
41+
...
42+
43+
Additional jquery-timepicker plugin options can be specified by an options attribute::
2944

3045
...
31-
<field name="mytimefieldname" `widget=timepicker`` options="{'step': '30', 'disableTextInput': false}"/>
46+
<field name="mytimefieldname" widget="timepicker" options="{'step': '30', 'disableTextInput': false}"/>
3247
...
3348

34-
See the available options at https://github.com/jonthornton/jquery-timepicker#timepicker-plugin-for-jquery.
49+
See the available options at `jquery-timepicker <https://github.com//jonthornton//jquery-timepicker#timepicker-plugin-for-jquery>`_.
50+
51+
.. |picker| image:: ./images/picker.png
52+
.. |formview| image:: ./images/form_view.png
3553

3654

3755
Known issues / Roadmap
3856
======================
3957

40-
* Absolutely no sanity check or validation on options.
58+
* No validation on options.
4159

4260

4361
Credits
4462
=======
4563

46-
Jon Thornton (https://cdnjs.com/libraries/jquery-timepicker)
47-
jquery.timepicker plugin - This software is made available under the open source MIT License. © 2014 Jon Thornton and contributors
64+
* The module uses the `jquery-timepicker <https://cdnjs.com//libraries//jquery-timepicker>`_ plugin by Jon Thornton. This software is made available under the open source MIT License. © 2014 Jon Thornton and contributors
4865

49-
Odoo Community Association (OCA)
66+
* Odoo Community Association (OCA)
5067

5168

5269
Contributors
5370
------------
5471

55-
* Michael Fried
72+
* Michael Fried <Michael.Fried@vividlab.de>

web_widget_timepicker/__openerp__.py

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
# -*- coding: utf-8 -*-
2-
# © 2016 Michael Fried @ Vividlab (<http://www.vividlab.de>)
2+
# © 2016 Vividlab (<http://www.vividlab.de>)
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4-
54
{
6-
'name': 'Web Timepicker Widget',
7-
'version': '9.0.1.0.0',
8-
'author': 'Michael Fried@Vividlab, Odoo Community Association (OCA)',
9-
'license': 'AGPL-3',
10-
'category': 'Web',
11-
'website': 'https://github.com/OCA/Web',
12-
13-
'depends': [
14-
'web'
15-
],
16-
'css': [
17-
'static/src/lib/jquery.timerpicker/jquery.timepicker.css',
18-
'static/src/css/web_widget_timepicker.css'
5+
"name": "Web Timepicker Widget",
6+
"version": "9.0.1.0.0",
7+
"author": "VividLab, Odoo Community Association (OCA)",
8+
"license": "AGPL-3",
9+
"category": "Web",
10+
"website": "http://www.vividlab.de",
11+
"installable": True,
12+
"depends": [
13+
"web",
1914
],
20-
'js': [
21-
'static/src/lib/jquery.timerpicker/jquery.timepicker.js',
22-
'static/src/js/web_widget_timepicker.js',
15+
"css": [
16+
"static/src/lib/jquery.timerpicker/jquery.timepicker.css",
17+
"static/src/css/web_widget_timepicker.css",
2318
],
24-
'qweb': [
25-
'static/src/xml/web_widget_timepicker.xml'
19+
"js": [
20+
"static/src/lib/jquery.timerpicker/jquery.timepicker.js",
21+
"static/src/js/web_widget_timepicker.js",
2622
],
27-
'data': [
28-
'views/web_widget_timepicker_assets.xml'
23+
"data": [
24+
"views/web_widget_timepicker_assets.xml",
2925
],
30-
31-
"installable": True,
26+
"qweb": [
27+
"static/src/xml/web_widget_timepicker.xml",
28+
]
3229
}
4.18 KB
Loading
3.78 KB
Loading
Loading

0 commit comments

Comments
 (0)