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.

91 lines
2.4 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. Web Notify
  6. ==========
  7. Send instant notification messages to the user in live.
  8. This technical module allows you to send instant notification messages from the server to the user in live.
  9. Two kinds of notification are supported.
  10. * Warning: Displayed in a red flying popup div
  11. * Information: Displayed in a light yellow flying popup div
  12. To send a notification to the user you just need to call one of the new methods defined on res.users:
  13. .. code-block:: python
  14. self.env.user.notify_info('My information message')
  15. or
  16. .. code-block:: python
  17. self.env.user.notify_warning('My marning message')
  18. .. figure:: static/description/notifications_screenshot.png
  19. :scale: 80 %
  20. :alt: Sample notifications
  21. The notifications can optionally have some action buttons.
  22. * One allowing to refresh the active view
  23. It is activated when sending the notification with:
  24. .. code-block:: python
  25. self.env.user.notify_info('My information message', show_reload=True)
  26. Installation
  27. ============
  28. This module is based on the Instant Messaging Bus. To work properly, the server must be launched in gevent mode.
  29. Usage
  30. =====
  31. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  32. :alt: Try me on Runbot
  33. :target: https://runbot.odoo-community.org/runbot/162/10.0
  34. Bug Tracker
  35. ===========
  36. Bugs are tracked on `GitHub Issues
  37. <https://github.com/OCA/web/issues>`_. In case of trouble, please
  38. check there if your issue has already been reported. If you spotted it first,
  39. help us smashing it by providing a detailed and welcomed feedback.
  40. Credits
  41. =======
  42. Images
  43. ------
  44. * Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
  45. Contributors
  46. ------------
  47. * Laurent Mignon <laurent.mignon@acsone.eu>
  48. * Serpent Consulting Services Pvt. Ltd.<jay.vora@serpentcs.com>
  49. Maintainer
  50. ----------
  51. .. image:: https://odoo-community.org/logo.png
  52. :alt: Odoo Community Association
  53. :target: https://odoo-community.org
  54. This module is maintained by the OCA.
  55. OCA, or the Odoo Community Association, is a nonprofit organization whose
  56. mission is to support the collaborative development of Odoo features and
  57. promote its widespread use.
  58. To contribute to this module, please visit https://odoo-community.org.