[MIG] web_notify_channel_message: Migration to 18.0

pull/3026/head
JasminSForgeFlow 2024-12-19 10:39:06 +05:30
parent 0208338ae0
commit 12f9bafeda
2 changed files with 7 additions and 1 deletions

View File

@ -6,7 +6,7 @@
"name": "Web Notify Channel Message",
"summary": """
Send an instant notification to channel users when a new message is posted""",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"development_status": "Alpha",

View File

@ -11,6 +11,8 @@ class ResUsers(models.Model):
title=None,
sticky=False,
target=None,
action=None,
params=None,
):
if self.env.context.get("_notify_channel_message", False):
return super(ResUsers, self.sudo())._notify_channel(
@ -19,6 +21,8 @@ class ResUsers(models.Model):
title=title,
sticky=sticky,
target=target,
action=action,
params=params,
)
return super()._notify_channel(
type_message=type_message,
@ -26,4 +30,6 @@ class ResUsers(models.Model):
title=title,
sticky=sticky,
target=target,
action=action,
params=params,
)