From 8ab505205d0c8ddee4da7a2266552847519772e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 2 Dec 2025 13:08:05 +0100 Subject: [PATCH] Allow users to subscribe to chats --- sao/CHANGELOG | 1 + sao/images/tryton-notification-off.svg | 1 + sao/images/tryton-notification-on.svg | 1 + sao/src/chat.js | 53 +++++++++++++++++++ sao/src/common.js | 2 + tryton/CHANGELOG | 1 + tryton/tryton/chat.py | 44 +++++++++++++++ .../tryton/tryton-notification-off.svg | 1 + .../pixmaps/tryton/tryton-notification-on.svg | 1 + tryton/tryton/rpc.py | 11 ++-- trytond/trytond/ir/chat.py | 36 +++++++++++-- trytond/trytond/ir/ui/menu.py | 2 + 12 files changed, 145 insertions(+), 9 deletions(-) create mode 100644 sao/images/tryton-notification-off.svg create mode 100644 sao/images/tryton-notification-on.svg create mode 100644 tryton/tryton/data/pixmaps/tryton/tryton-notification-off.svg create mode 100644 tryton/tryton/data/pixmaps/tryton/tryton-notification-on.svg diff --git a/sao/CHANGELOG b/sao/CHANGELOG index af76c99880..fcee2db1f5 100644 --- a/sao/CHANGELOG +++ b/sao/CHANGELOG @@ -1,3 +1,4 @@ +* Allow users to subscribe to chats * Manage user notification * Add search on empty relation field to domain parser * Escape completion content with custom format (issue14363) diff --git a/sao/images/tryton-notification-off.svg b/sao/images/tryton-notification-off.svg new file mode 100644 index 0000000000..f48b825d32 --- /dev/null +++ b/sao/images/tryton-notification-off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/sao/images/tryton-notification-on.svg b/sao/images/tryton-notification-on.svg new file mode 100644 index 0000000000..1582e4d409 --- /dev/null +++ b/sao/images/tryton-notification-on.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/sao/src/chat.js b/sao/src/chat.js index f8ac11b425..bc27560ae4 100644 --- a/sao/src/chat.js +++ b/sao/src/chat.js @@ -50,6 +50,59 @@ 'class': 'chat', }); + let btn_group = jQuery('
', { + 'class': 'btn-group', + 'role': 'group', + }).appendTo(el); + + let subscribe_btn = jQuery('