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.

72 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. Date & Time Formatter
  6. =====================
  7. This module was written to extend the functionality of Odoo language engine to
  8. support formatting `Date`, `Time` and `Datetime` fields easily and allow you to
  9. print them in the best format for the user.
  10. Usage
  11. =====
  12. This module adds a technical programming feature, and it should be used by
  13. addon developers, not by end users. This means that you must not expect to see
  14. any changes if you are a user and install this, but if you find you have it
  15. already installed, it's probably because you have another modules that depend
  16. on this one.
  17. If you are a developer, to use this module, you need to:
  18. * Call anywhere in your code::
  19. formatted_string = self.env["res.lang"].datetime_formatter(datetime_value)
  20. * If you use Qweb::
  21. <t t-esc="env['res.lang'].datetime_formatter(datetime_value)"/>
  22. * If you call it from a record that has a `lang` field::
  23. formatted_string = record.lang.datetime_formatter(record.datetime_field)
  24. * ``models.ResLang.datetime_formatter`` docstring explains its usage.
  25. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  26. :alt: Try me on Runbot
  27. :target: https://runbot.odoo-community.org/runbot/149/9.0
  28. Bug Tracker
  29. ===========
  30. Bugs are tracked on `GitHub Issues
  31. <https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
  32. check there if your issue has already been reported. If you spotted it first,
  33. help us smashing it by providing a detailed and welcomed feedback.
  34. Credits
  35. =======
  36. Contributors
  37. ------------
  38. * Jairo Llopis <j.llopis@grupoesoc.es>
  39. * Vicent Cubells <vicent.cubells@tecnativa.com>
  40. Maintainer
  41. ----------
  42. .. image:: https://odoo-community.org/logo.png
  43. :alt: Odoo Community Association
  44. :target: https://odoo-community.org
  45. This module is maintained by the OCA.
  46. OCA, or the Odoo Community Association, is a nonprofit organization whose
  47. mission is to support the collaborative development of Odoo features and
  48. promote its widespread use.
  49. To contribute to this module, please visit http://odoo-community.org.