[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
committed by David
parent d21c87f525
commit 9cd5f5b981
17 changed files with 641 additions and 75 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.
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.
.. figure:: static/description/test_notifications_demo.png
:scale: 80 %
:alt: Sample notifications