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.

73 lines
2.5 KiB

9 years ago
  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. More completion options for datetime fields
  6. ===========================================
  7. This module was written to extend the offers shown to the user when starting
  8. to fill in a date. In standard odoo, the only offer is the date at 00:00:00
  9. hours, while it can be convenient for the user to have other options, too.
  10. When searching for the end of a period, ``23:59:59`` would come to mind, and
  11. there also might be domain specific times that make sense.
  12. Configuration
  13. =============
  14. If you do nothing, only the time ``23:59:59`` is added to the completion
  15. dropdown.
  16. In your code, you can add an options dictionary with a key
  17. ``completion_options`` which contains a list if dictionaries detailing the
  18. offsets that should be added to the parsed date, like::
  19. <field name="my_datetime_field" options="{'completion_options': [{'hours': 12, 'minutes': 30, 'seconds': 0}]}" />
  20. which would offer to search for the date at half past twelve. Note that when
  21. you set ``completion_options``, you have to list all options you want to see,
  22. as the standard options will be replaced with your list.
  23. Usage
  24. =====
  25. Start filling in your date in a search field and choose one of the additional
  26. options offered.
  27. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  28. :alt: Try me on Runbot
  29. :target: https://runbot.odoo-community.org/runbot/162/8.0
  30. Bug Tracker
  31. ===========
  32. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  33. In case of trouble, please check there if your issue has already been reported.
  34. If you spotted it first, help us smashing it by providing a detailed and
  35. welcomed feedback
  36. `here <https://github.com/OCA/web/issues/new?body=module:%20
  37. web_search_datetime_completion%0Aversion:%20
  38. 8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  39. Credits
  40. =======
  41. Contributors
  42. ------------
  43. * Holger Brunn <hbrunn@therp.nl>
  44. Maintainer
  45. ----------
  46. .. image:: https://odoo-community.org/logo.png
  47. :alt: Odoo Community Association
  48. :target: https://odoo-community.org
  49. This module is maintained by the OCA.
  50. OCA, or the Odoo Community Association, is a nonprofit organization whose
  51. mission is to support the collaborative development of Odoo features and
  52. promote its widespread use.
  53. To contribute to this module, please visit https://odoo-community.org.