[12.0] web_notify: improve popup UI (#1231)

* [ADD]: all available bootstrap notifications (success/danger/warning/info/default)
* [IMP] use black color for text for default notification.
* [FIX] reverted require string for `bus.Longpolling` and rename `on_message_received` to `on_message` to prevent collisions.
This commit is contained in:
Shepilov Vladislav
2019-04-05 13:39:14 +03:00
committed by David
parent af2656ba00
commit 3db7072296
17 changed files with 406 additions and 117 deletions

View File

@@ -2,14 +2,32 @@
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
self.env.user.notify_success(message='My success message')
or
.. code-block:: python
self.env.user.notify_warning(message='My marning message')
self.env.user.notify_danger(message='My danger message')
or
.. code-block:: python
self.env.user.notify_warning(message='My warning message')
or
.. code-block:: python
self.env.user.notify_info(message='My information message')
or
.. code-block:: python
self.env.user.notify_default(message='My default message')
.. figure:: static/description/notifications_screenshot.png
:scale: 80 %