web/web_widget_timepicker
Holger Brunn 557da70a7c
[FIX] RST syntax
2018-06-26 09:22:25 +02:00
..
i18n [UPD] Update web_widget_timepicker.pot 2018-06-24 01:39:50 +00:00
images [FIX]: Change README.rst according to OCA template 2016-05-20 11:54:37 +02:00
static [10.0][MIG]migrate web_widget_timepicker 2017-07-21 21:26:13 +05:30
views [10.0][MIG]migrate web_widget_timepicker 2017-07-21 21:26:13 +05:30
README.rst [FIX] RST syntax 2018-06-26 09:22:25 +02:00
__init__.py [FIX]: More TravisCI LINT errors 2016-05-18 22:55:09 +02:00
__manifest__.py [10.0][MIG]migrate web_widget_timepicker 2017-07-21 21:26:13 +05:30

README.rst

.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
   :alt: License: AGPL-3

===============================
Timepicker widget in form views
===============================

This module provides a timepicker widget for float fields.
It can be used as a replacement for the standard float_time widget in form views.


|picker|


The widget has the following default timepicker options:

* the possible selection is based on 15 minute interval (step: 15)
* 24 hour mode in H:i format (timeFormat: 'H:i')
* scroll selection starts at current time (scrollDefault: 'now')


|formview|


Usage
=====

In the form view declaration, put widget='timepicker' attribute in the field tag::

    ...
    <field name="arch" type="xml">
        <form string="View name">
            ...
            <field name="name"/>
            <field name="mytimefieldname" widget="timepicker"/>
            ...
        </form>
    </field>
    ...

Additional jquery-timepicker plugin options can be specified by an options attribute::

    ...
    <field name="mytimefieldname" widget="timepicker" options="{'step': '30', 'disableTextInput': false}"/>
    ...

See the available options at `jquery-timepicker <https://github.com//jonthornton//jquery-timepicker#timepicker-plugin-for-jquery>`_.

.. |picker| image:: ./images/picker.png
.. |formview| image:: ./images/form_view.png


Credits
=======

* The module uses the `jquery-timepicker plugin <https://github.com//jonthornton//jquery-timepicker#timepicker-plugin-for-jquery>`_ by Jon Thornton. This software is made available under the open source MIT License. © 2014 Jon Thornton and contributors

* Odoo Community Association (OCA)


Contributors
------------

* Michael Fried <Michael.Fried@vividlab.de>
* Kaushal Prajapati <kbprajapati@live.com>


Maintainer
----------

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.