diff --git a/README.md b/README.md index f86bc05d5..f38bcd67b 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ addon | version | maintainers | summary [web_listview_range_select](web_listview_range_select/) | 16.0.1.0.0 | | Enables selecting a range of records using the shift key [web_m2x_options](web_m2x_options/) | 16.0.1.1.2 | | web_m2x_options [web_no_bubble](web_no_bubble/) | 16.0.1.0.0 | | Remove the bubbles from the web interface -[web_notify](web_notify/) | 16.0.1.0.1 | | Send notification messages to user +[web_notify](web_notify/) | 16.0.2.0.0 | | Send notification messages to user [web_notify_channel_message](web_notify_channel_message/) | 16.0.1.0.0 | | Send an instant notification to channel users when a new message is posted [web_pivot_computed_measure](web_pivot_computed_measure/) | 16.0.1.0.0 | [![CarlosRoca13](https://github.com/CarlosRoca13.png?size=30px)](https://github.com/CarlosRoca13) | Web Pivot Computed Measure [web_pwa_oca](web_pwa_oca/) | 16.0.1.0.0 | [![eLBati](https://github.com/eLBati.png?size=30px)](https://github.com/eLBati) | Make Odoo a PWA diff --git a/web_notify/README.rst b/web_notify/README.rst index 660229455..27995bd1c 100644 --- a/web_notify/README.rst +++ b/web_notify/README.rst @@ -7,7 +7,7 @@ Web Notify !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:4517d4a854a8c5b84197dc9510ae75ac0fa82ce2a37a3a0d4078ea51a65c073f + !! source digest: sha256:0f62f42226ca419e7db3fb3ee2a5be600f06184db73c61097ddc2fadbcf09025 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png @@ -73,6 +73,12 @@ or 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') @@ -90,7 +96,7 @@ The action can be used using the ``action`` keyword: .. code-block:: python - action = self.env.ref('sale.action_orders').read()[0] + action = self.env["ir.actions.act_window"]._for_xml_id('sale.action_orders') action.update({ 'res_id': self.id, 'views': [(False, 'form')], @@ -136,7 +142,6 @@ Contributors * Aitor Bouzas * Shepilov Vladislav * Kevin Khao -* Guewen Baconnier * `Tecnativa `_: * David Vidal diff --git a/web_notify/__manifest__.py b/web_notify/__manifest__.py index 69b35556c..ae2df076c 100644 --- a/web_notify/__manifest__.py +++ b/web_notify/__manifest__.py @@ -6,7 +6,7 @@ "name": "Web Notify", "summary": """ Send notification messages to user""", - "version": "16.0.1.0.1", + "version": "16.0.2.0.0", "license": "AGPL-3", "author": "ACSONE SA/NV," "AdaptiveCity," "Odoo Community Association (OCA)", "development_status": "Production/Stable", diff --git a/web_notify/static/description/index.html b/web_notify/static/description/index.html index d7700112d..6476ccf3f 100644 --- a/web_notify/static/description/index.html +++ b/web_notify/static/description/index.html @@ -1,4 +1,3 @@ - @@ -367,7 +366,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:4517d4a854a8c5b84197dc9510ae75ac0fa82ce2a37a3a0d4078ea51a65c073f +!! source digest: sha256:0f62f42226ca419e7db3fb3ee2a5be600f06184db73c61097ddc2fadbcf09025 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Production/Stable License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

Send instant notification messages to the user in live.

@@ -420,6 +419,21 @@ Two kinds of notification are supported.

 self.env.user.notify_default(message='My default message')
 
+

The notifications can bring interactivity with some buttons.

+
    +
  • One allowing to refresh the active view
  • +
  • Another allowing to send a window / client action
  • +
+

The reload button is activated when sending the notification with:

+

The action can be used using the action keyword:

+
+ action = self.env["ir.actions.act_window"]._for_xml_id('sale.action_orders')
+ action.update({
+     'res_id': self.id,
+     'views': [(False, 'form')],
+ })
+self.env.user.notify_info('My information message', action=action)
+
Sample notifications