[MIG] web_notify: Migration to 12.0

Add self-test buttons in demo environment,
Updated readme to show how to test it.
Add buttons to users form
Do not rely on SUPERUSER_ID and avoid getattr usage
This commit is contained in:
Aitor Bouzas
2018-10-10 10:37:35 +02:00
parent 453f31e033
commit fbb550f65c
16 changed files with 622 additions and 69 deletions

View File

@@ -0,0 +1,3 @@
* Laurent Mignon <laurent.mignon@acsone.eu>
* Serpent Consulting Services Pvt. Ltd.<jay.vora@serpentcs.com>
* Aitor Bouzas <aitor.bouzas@adaptivecity.com>

View File

@@ -0,0 +1,7 @@
Send instant notification messages to the user in live.
This technical module allows you to send instant notification messages from the server to the user in live.
Two kinds of notification are supported.
* Warning: Displayed in a red flying popup div
* Information: Displayed in a light yellow flying popup div

View File

@@ -0,0 +1 @@
This module is based on the Instant Messaging Bus. To work properly, the server must be launched in gevent mode.

View File

@@ -0,0 +1,23 @@
To send a notification to the user you just need to call one of the new methods defined on res.users:
.. code-block:: python
self.env.user.notify_info(message='My information message')
or
.. code-block:: python
self.env.user.notify_warning(message='My marning message')
.. figure:: static/description/notifications_screenshot.png
:scale: 80 %
:alt: Sample notifications
You can test the behaviour of the notifications by installing this module in a demo database.
Click in your user logo in the top right corner of the screen then click "Preferences".
.. figure:: static/description/test_notifications_demo.png
:scale: 80 %
:alt: Sample notifications