mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[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:
committed by
David
parent
af2656ba00
commit
3db7072296
@@ -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 %
|
||||
|
||||
Reference in New Issue
Block a user