Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ addon | version | maintainers | summary
[web_ir_actions_act_window_message](web_ir_actions_act_window_message/) | 18.0.1.0.0 | | Show a message box to users
[web_m2x_options](web_m2x_options/) | 18.0.1.0.1 | | web_m2x_options
[web_no_bubble](web_no_bubble/) | 18.0.1.0.0 | | Remove the bubbles from the web interface
[web_notify](web_notify/) | 18.0.1.1.0 | | Send notification messages to user
[web_notify_channel_message](web_notify_channel_message/) | 18.0.1.0.0 | | Send an instant notification to channel users when a new message is posted
[web_notify](web_notify/) | 18.0.1.1.1 | | Send notification messages to user
[web_notify_channel_message](web_notify_channel_message/) | 18.0.1.0.1 | | Send an instant notification to channel users when a new message is posted
[web_notify_upgrade](web_notify_upgrade/) | 18.0.1.0.0 | | Notify active users when a module is installed or updated
[web_pivot_computed_measure](web_pivot_computed_measure/) | 18.0.1.0.5 | <a href='https://github.com/CarlosRoca13'><img src='https://github.com/CarlosRoca13.png' width='32' height='32' style='border-radius:50%;' alt='CarlosRoca13'/></a> | Web Pivot Computed Measure
[web_quick_start_screen](web_quick_start_screen/) | 18.0.1.0.0 | | Configurable start screen for quick actions
Expand Down
2 changes: 1 addition & 1 deletion web_notify/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Web Notify
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:db8e4b2dd61e85e61e2b3a50f14d0642d9dfeec1dc7046d2e244f1cb35d3720c
!! source digest: sha256:c087e4a564febe99ec4833cde4e3e775a04ca6bf574c41e69070e910a37512af
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
2 changes: 1 addition & 1 deletion web_notify/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Web Notify",
"summary": """
Send notification messages to user""",
"version": "18.0.1.1.0",
"version": "18.0.1.1.1",
"license": "LGPL-3",
"author": "ACSONE SA/NV," "AdaptiveCity," "Odoo Community Association (OCA)",
"development_status": "Production/Stable",
Expand Down
25 changes: 20 additions & 5 deletions web_notify/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,58 +49,71 @@ def notify_success(
sticky=False,
target=None,
action=None,
html=False,
params=None,
):
title = title or _("Success")
self._notify_channel(SUCCESS, message, title, sticky, target, action, params)
self._notify_channel(
SUCCESS, message, title, sticky, target, html, action, params
)

def notify_danger(
self,
message="Default message",
title=None,
sticky=False,
target=None,
html=False,
action=None,
params=None,
):
title = title or _("Danger")
self._notify_channel(DANGER, message, title, sticky, target, action, params)
self._notify_channel(
DANGER, message, title, sticky, target, html, action, params
)

def notify_warning(
self,
message="Default message",
title=None,
sticky=False,
target=None,
html=False,
action=None,
params=None,
):
title = title or _("Warning")
self._notify_channel(WARNING, message, title, sticky, target, action, params)
self._notify_channel(
WARNING, message, title, sticky, target, html, action, params
)

def notify_info(
self,
message="Default message",
title=None,
sticky=False,
target=None,
html=False,
action=None,
params=None,
):
title = title or _("Information")
self._notify_channel(INFO, message, title, sticky, target, action, params)
self._notify_channel(INFO, message, title, sticky, target, html, action, params)

def notify_default(
self,
message="Default message",
title=None,
sticky=False,
target=None,
html=False,
action=None,
params=None,
):
title = title or _("Default")
self._notify_channel(DEFAULT, message, title, sticky, target, action, params)
self._notify_channel(
DEFAULT, message, title, sticky, target, html, action, params
)

def _notify_channel(
self,
Expand All @@ -109,6 +122,7 @@ def _notify_channel(
title=None,
sticky=False,
target=None,
html=False,
action=None,
params=None,
):
Expand All @@ -127,6 +141,7 @@ def _notify_channel(
"message": message,
"title": title,
"sticky": sticky,
"html": html,
"action": action,
"params": dict(params or []),
}
Expand Down
2 changes: 1 addition & 1 deletion web_notify/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Web Notify</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:db8e4b2dd61e85e61e2b3a50f14d0642d9dfeec1dc7046d2e244f1cb35d3720c
!! source digest: sha256:c087e4a564febe99ec4833cde4e3e775a04ca6bf574c41e69070e910a37512af
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_notify"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_notify"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Send instant notification messages to the user in live.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const webNotificationService = {
type: notification.type,
sticky: notification.sticky,
className: notification.className,
messageIsHtml: notification.html,
buttons: buttons.map((button) => {
const onClick = button.onClick;
button.onClick = async () => {
Expand Down
5 changes: 5 additions & 0 deletions web_notify/tests/test_res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def test_notify_success(self):
"message": "message",
"title": "title",
"sticky": True,
"html": False,
"action": None,
"params": {},
}
Expand All @@ -37,6 +38,7 @@ def test_notify_danger(self):
"message": "message",
"title": "title",
"sticky": True,
"html": False,
"action": None,
"params": {},
}
Expand All @@ -56,6 +58,7 @@ def test_notify_warning(self):
"message": "message",
"title": "title",
"sticky": True,
"html": False,
"action": None,
"params": {},
}
Expand All @@ -75,6 +78,7 @@ def test_notify_info(self):
"message": "message",
"title": "title",
"sticky": True,
"html": False,
"action": None,
"params": {},
}
Expand All @@ -94,6 +98,7 @@ def test_notify_default(self):
"message": "message",
"title": "title",
"sticky": True,
"html": False,
"action": None,
"params": {},
}
Expand Down
8 changes: 6 additions & 2 deletions web_notify_channel_message/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==========================
Web Notify Channel Message
==========================
Expand All @@ -7,13 +11,13 @@ Web Notify Channel Message
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6047cc1715c1c9f1835efc8ac828d45b54d307cb5ff43368e40ecbc79b0575f0
!! source digest: sha256:11845b462bb3c2336ae264335bcd2416a6fc49c1455bddea10b9ccc8637d6312
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
Expand Down
2 changes: 1 addition & 1 deletion web_notify_channel_message/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Web Notify Channel Message",
"summary": """
Send an instant notification to channel users when a new message is posted""",
"version": "18.0.1.0.0",
"version": "18.0.1.0.1",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"development_status": "Alpha",
Expand Down
3 changes: 3 additions & 0 deletions web_notify_channel_message/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def _notify_channel(
title=None,
sticky=False,
target=None,
html=False,
action=None,
params=None,
):
Expand All @@ -21,6 +22,7 @@ def _notify_channel(
title=title,
sticky=sticky,
target=target,
html=html,
action=action,
params=params,
)
Expand All @@ -30,6 +32,7 @@ def _notify_channel(
title=title,
sticky=sticky,
target=target,
html=html,
action=action,
params=params,
)
26 changes: 16 additions & 10 deletions web_notify_channel_message/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Web Notify Channel Message</title>
<title>README.rst</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,16 +360,21 @@
</style>
</head>
<body>
<div class="document" id="web-notify-channel-message">
<h1 class="title">Web Notify Channel Message</h1>
<div class="document">


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="web-notify-channel-message">
<h1>Web Notify Channel Message</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6047cc1715c1c9f1835efc8ac828d45b54d307cb5ff43368e40ecbc79b0575f0
!! source digest: sha256:11845b462bb3c2336ae264335bcd2416a6fc49c1455bddea10b9ccc8637d6312
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_notify_channel_message"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_notify_channel_message"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_notify_channel_message"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_notify_channel_message"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module will send an instant notifications to all users of a channel
when a new message has been posted.</p>
<div class="admonition important">
Expand All @@ -391,23 +396,23 @@ <h1 class="title">Web Notify Channel Message</h1>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_notify_channel_message%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
<ul class="simple">
<li>ForgeFlow</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
<ul class="simple">
<li>Joan Sisquella &lt;<a class="reference external" href="mailto:joan.sisquella&#64;forgeflow.com">joan.sisquella&#64;forgeflow.com</a>&gt;</li>
<li>Thiago Mulero &lt;<a class="reference external" href="mailto:thiago.mulero&#64;forgeflow.com">thiago.mulero&#64;forgeflow.com</a>&gt;</li>
Expand All @@ -416,7 +421,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand All @@ -429,5 +434,6 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
</div>
</div>
</div>
</div>
</body>
</html>
Loading