You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.2 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. ===============================
  5. Timepicker widget in form views
  6. ===============================
  7. This module provides a timepicker widget for float fields.
  8. It can be used as a replacement for the standard float_time widget in form views.
  9. |picker|
  10. The widget has the following default timepicker options:
  11. * the possible selection is based on 15 minute interval (step: 15)
  12. * 24 hour mode in H:i format (timeFormat: 'H:i')
  13. * scroll selection starts at current time (scrollDefault: 'now')
  14. |formview|
  15. Usage
  16. =====
  17. In the form view declaration, put widget='timepicker' attribute in the field tag::
  18. ...
  19. <field name="arch" type="xml">
  20. <form string="View name">
  21. ...
  22. <field name="name"/>
  23. <field name="mytimefieldname" widget="timepicker"/>
  24. ...
  25. </form>
  26. </field>
  27. ...
  28. Additional jquery-timepicker plugin options can be specified by an options attribute::
  29. ...
  30. <field name="mytimefieldname" widget="timepicker" options="{'step': '30', 'disableTextInput': false}"/>
  31. ...
  32. See the available options at `jquery-timepicker <https://github.com//jonthornton//jquery-timepicker#timepicker-plugin-for-jquery>`_.
  33. .. |picker| image:: ./images/picker.png
  34. .. |formview| image:: ./images/form_view.png
  35. Credits
  36. =======
  37. * The module uses the `jquery-timepicker <https://github.com//jonthornton//jquery-timepicker#timepicker-plugin-for-jquery>`_. plugin by Jon Thornton. This software is made available under the open source MIT License. © 2014 Jon Thornton and contributors
  38. * Odoo Community Association (OCA)
  39. Contributors
  40. ------------
  41. * Michael Fried <Michael.Fried@vividlab.de>
  42. * Kaushal Prajapati <kbprajapati@live.com>
  43. Maintainer
  44. ----------
  45. .. image:: https://odoo-community.org/logo.png
  46. :alt: Odoo Community Association
  47. :target: https://odoo-community.org
  48. This module is maintained by the OCA.
  49. OCA, or the Odoo Community Association, is a nonprofit organization whose
  50. mission is to support the collaborative development of Odoo features and
  51. promote its widespread use.
  52. To contribute to this module, please visit https://odoo-community.org.