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.

57 lines
2.3 KiB

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