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.

23 lines
763 B

  1. To send a notification to the user you just need to call one of the new methods defined on res.users:
  2. .. code-block:: python
  3. self.env.user.notify_info(message='My information message')
  4. or
  5. .. code-block:: python
  6. self.env.user.notify_warning(message='My marning message')
  7. .. figure:: static/description/notifications_screenshot.png
  8. :scale: 80 %
  9. :alt: Sample notifications
  10. You can test the behaviour of the notifications by installing this module in a demo database.
  11. Access the users form through Settings -> Users & Companies. You'll see a tab called "Test web notify", here you'll find two buttons that'll allow you test the module.
  12. .. figure:: static/description/test_notifications_demo.png
  13. :scale: 80 %
  14. :alt: Sample notifications