diff --git a/chat_favourites_in_systray/README.rst b/chat_favourites_in_systray/README.rst new file mode 100755 index 000000000..3f2f81381 --- /dev/null +++ b/chat_favourites_in_systray/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Chat Favourites In Systray +========================== +This module helps you to enable desired chat's as favourite and view them from a shortcut added in systray + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer : (V17) Nivedhya T, + (V16) Abhin K, +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +License +------- +Affero General Public License , Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/chat_favourites_in_systray/__init__.py b/chat_favourites_in_systray/__init__.py new file mode 100644 index 000000000..f2720e9e6 --- /dev/null +++ b/chat_favourites_in_systray/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import controllers +from . import models diff --git a/chat_favourites_in_systray/__manifest__.py b/chat_favourites_in_systray/__manifest__.py new file mode 100644 index 000000000..5df7d232e --- /dev/null +++ b/chat_favourites_in_systray/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': "Chat Favourites In Systray", + 'version': '17.0.1.0.0', + 'category': 'Productivity', + 'summary': """Shortcut for viewing favourite chats from systray""", + 'description': "This module showcases favorite chat conversations " + "in the system tray, providing users with quick access " + "to favourite chats without navigating through the " + "full application interface.", + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['mail'], + 'data': [ + 'views/res_users_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'chat_favourites_in_systray/static/src/js/messaging_menu.js', + 'chat_favourites_in_systray/static/src/js/notification_item.js', + 'chat_favourites_in_systray/static/src/xml/systray.xml', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/chat_favourites_in_systray/controllers/__init__.py b/chat_favourites_in_systray/controllers/__init__.py new file mode 100644 index 000000000..861cb1015 --- /dev/null +++ b/chat_favourites_in_systray/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import chat_favourites_in_systray diff --git a/chat_favourites_in_systray/controllers/chat_favourites_in_systray.py b/chat_favourites_in_systray/controllers/chat_favourites_in_systray.py new file mode 100644 index 000000000..ad269c58b --- /dev/null +++ b/chat_favourites_in_systray/controllers/chat_favourites_in_systray.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import Command, http +from odoo.http import request + + +class ChatFavourite(http.Controller): + """Controller Class is created to handle the favourite chat functions""" + + @http.route('/enable_favourite', type='json', auth='user') + def enable_favourite(self, **kwargs): + """Enable the favourite button if selected""" + active_id = kwargs.get('active_id') + user_id = kwargs.get('user_id') # Directly from the JS + user = request.env['res.users'].sudo().browse(int(user_id)) + user.mail_channel_ids = [Command.link(int(active_id))] + return active_id + + @http.route('/disable_favourite', type='json', auth='user') + def disable_favourite(self, **kwargs): + """Disable the favourite button if deselected""" + active_id = kwargs.get('active_id') + user_id = kwargs.get('user_id') + user = request.env['res.users'].sudo().browse(int(user_id)) + user.mail_channel_ids = [Command.unlink(int(active_id))] + return active_id diff --git a/chat_favourites_in_systray/doc/RELEASE_NOTES.md b/chat_favourites_in_systray/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..48604bfa6 --- /dev/null +++ b/chat_favourites_in_systray/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 30.06.2025 +#### Version 17.0.1.0.0 +##### ADD +- Initial commit for Chat Favourites In Systray diff --git a/chat_favourites_in_systray/models/__init__.py b/chat_favourites_in_systray/models/__init__.py new file mode 100644 index 000000000..32f6931b6 --- /dev/null +++ b/chat_favourites_in_systray/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import res_users diff --git a/chat_favourites_in_systray/models/res_users.py b/chat_favourites_in_systray/models/res_users.py new file mode 100644 index 000000000..f60ada09f --- /dev/null +++ b/chat_favourites_in_systray/models/res_users.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class ResUsers(models.Model): + """Model is Inherited to add a Many2many to add favourite chats""" + _inherit = 'res.users' + + mail_channel_ids = fields.Many2many('discuss.channel', + string='Favourite Channel', + help='Favourite chats are added ' + 'to this field') diff --git a/chat_favourites_in_systray/static/description/assets/icons.zip b/chat_favourites_in_systray/static/description/assets/icons.zip new file mode 100644 index 000000000..a89db23c4 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons.zip differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/capture (1).png b/chat_favourites_in_systray/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/capture (1).png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/check.png b/chat_favourites_in_systray/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/check.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/chevron.png b/chat_favourites_in_systray/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/chevron.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/cogs.png b/chat_favourites_in_systray/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/cogs.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/consultation.png b/chat_favourites_in_systray/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/consultation.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/ecom-black.png b/chat_favourites_in_systray/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/ecom-black.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/education-black.png b/chat_favourites_in_systray/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/education-black.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/hotel-black.png b/chat_favourites_in_systray/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/hotel-black.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/img.png b/chat_favourites_in_systray/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/img.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/license.png b/chat_favourites_in_systray/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/license.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/lifebuoy.png b/chat_favourites_in_systray/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/lifebuoy.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/manufacturing-black.png b/chat_favourites_in_systray/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/manufacturing-black.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/photo-capture.png b/chat_favourites_in_systray/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/photo-capture.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/pos-black.png b/chat_favourites_in_systray/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/pos-black.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/puzzle.png b/chat_favourites_in_systray/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/puzzle.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/restaurant-black.png b/chat_favourites_in_systray/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/restaurant-black.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/service-black.png b/chat_favourites_in_systray/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/service-black.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/trading-black.png b/chat_favourites_in_systray/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/trading-black.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/training.png b/chat_favourites_in_systray/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/training.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/update.png b/chat_favourites_in_systray/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/update.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/user.png b/chat_favourites_in_systray/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/user.png differ diff --git a/chat_favourites_in_systray/static/description/assets/icons/wrench.png b/chat_favourites_in_systray/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/icons/wrench.png differ diff --git a/chat_favourites_in_systray/static/description/assets/misc.zip b/chat_favourites_in_systray/static/description/assets/misc.zip new file mode 100644 index 000000000..90feb5a77 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/misc.zip differ diff --git a/chat_favourites_in_systray/static/description/assets/misc/Cybrosys R.png b/chat_favourites_in_systray/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/misc/Cybrosys R.png differ diff --git a/chat_favourites_in_systray/static/description/assets/misc/email.svg b/chat_favourites_in_systray/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/chat_favourites_in_systray/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chat_favourites_in_systray/static/description/assets/misc/phone.svg b/chat_favourites_in_systray/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/chat_favourites_in_systray/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/chat_favourites_in_systray/static/description/assets/misc/star (1) 2.svg b/chat_favourites_in_systray/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/chat_favourites_in_systray/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chat_favourites_in_systray/static/description/assets/misc/support (1) 1.svg b/chat_favourites_in_systray/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/chat_favourites_in_systray/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chat_favourites_in_systray/static/description/assets/misc/support-email.svg b/chat_favourites_in_systray/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/chat_favourites_in_systray/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/chat_favourites_in_systray/static/description/assets/misc/tick-mark.svg b/chat_favourites_in_systray/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/chat_favourites_in_systray/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/chat_favourites_in_systray/static/description/assets/misc/whatsapp 1.svg b/chat_favourites_in_systray/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/chat_favourites_in_systray/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chat_favourites_in_systray/static/description/assets/misc/whatsapp.svg b/chat_favourites_in_systray/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/chat_favourites_in_systray/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chat_favourites_in_systray/static/description/assets/modules/b1.jpg b/chat_favourites_in_systray/static/description/assets/modules/b1.jpg new file mode 100644 index 000000000..8c4479884 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/modules/b1.jpg differ diff --git a/chat_favourites_in_systray/static/description/assets/modules/b2.jpg b/chat_favourites_in_systray/static/description/assets/modules/b2.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/modules/b2.jpg differ diff --git a/chat_favourites_in_systray/static/description/assets/modules/b3.jpg b/chat_favourites_in_systray/static/description/assets/modules/b3.jpg new file mode 100644 index 000000000..d7ef56df4 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/modules/b3.jpg differ diff --git a/chat_favourites_in_systray/static/description/assets/modules/b4.jpg b/chat_favourites_in_systray/static/description/assets/modules/b4.jpg new file mode 100644 index 000000000..a80a0d9dc Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/modules/b4.jpg differ diff --git a/chat_favourites_in_systray/static/description/assets/modules/b5.jpg b/chat_favourites_in_systray/static/description/assets/modules/b5.jpg new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/modules/b5.jpg differ diff --git a/chat_favourites_in_systray/static/description/assets/modules/b6.jpg b/chat_favourites_in_systray/static/description/assets/modules/b6.jpg new file mode 100644 index 000000000..5bf8e7b03 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/modules/b6.jpg differ diff --git a/chat_favourites_in_systray/static/description/assets/screenshots/hero.gif b/chat_favourites_in_systray/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..e705328fe Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/screenshots/hero.gif differ diff --git a/chat_favourites_in_systray/static/description/assets/screenshots/screenshot1.png b/chat_favourites_in_systray/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..a15b1fd95 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/screenshots/screenshot1.png differ diff --git a/chat_favourites_in_systray/static/description/assets/screenshots/screenshot2.png b/chat_favourites_in_systray/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..a52489d43 Binary files /dev/null and b/chat_favourites_in_systray/static/description/assets/screenshots/screenshot2.png differ diff --git a/chat_favourites_in_systray/static/description/banner.jpg b/chat_favourites_in_systray/static/description/banner.jpg new file mode 100644 index 000000000..48b9fb398 Binary files /dev/null and b/chat_favourites_in_systray/static/description/banner.jpg differ diff --git a/chat_favourites_in_systray/static/description/icon.png b/chat_favourites_in_systray/static/description/icon.png new file mode 100644 index 000000000..aeb7f0fae Binary files /dev/null and b/chat_favourites_in_systray/static/description/icon.png differ diff --git a/chat_favourites_in_systray/static/description/index.html b/chat_favourites_in_systray/static/description/index.html new file mode 100644 index 000000000..00c0ce3c0 --- /dev/null +++ b/chat_favourites_in_systray/static/description/index.html @@ -0,0 +1,529 @@ + + + + + + + Chat Favourites In Systray + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ Chat Favourites In Systray

+

+ Shortcut For Viewing Favourite Chats From Systray. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Shortcut For Favourite Chats.

+

Able to view favourite chats from shortcut added in systray. +

+
+
+
+
+
+
+ +
+
+

Community & Enterprise Support

+

Available in Odoo 17.0 Community and Enterprise. +

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ Mark Chat As Favourite +

+ Able to mark each chat as favourite by clicking on the star icon. + Also, able to remove the chat as favourite +
+
+
+
+
+
+ +
+
+

+ Display Favourite Chats +

+ By clicking the star icon in the systray and refreshing the page, all favourite chats can be viewed from the dropdown. +
+
+
+
+
+
+
    +
  • + Able to view favourite chats from shortcut added in systray. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:30th June 2025 +
+

+ + Initial Commit for Chat Favourites In Systray

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Licensing Consultancy

+
+
+
+
+
+
+

Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

Education

+

A platform for educational management

+
+
+
+
+ +

Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service Management

+

Keep track of services and invoice

+
+
+
+
+ +

Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to us on WhatsApp!

+
+91 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/chat_favourites_in_systray/static/src/css/systray.css b/chat_favourites_in_systray/static/src/css/systray.css new file mode 100644 index 000000000..f1a89ec35 --- /dev/null +++ b/chat_favourites_in_systray/static/src/css/systray.css @@ -0,0 +1,3 @@ +.MessagingMenuContainer div:first-child { + display: flex; +} diff --git a/chat_favourites_in_systray/static/src/js/messaging_menu.js b/chat_favourites_in_systray/static/src/js/messaging_menu.js new file mode 100644 index 000000000..a8ba075cb --- /dev/null +++ b/chat_favourites_in_systray/static/src/js/messaging_menu.js @@ -0,0 +1,70 @@ +/** @odoo-module **/ +import { MessagingMenu } from "@mail/core/web/messaging_menu"; +import { patch } from "@web/core/utils/patch"; +import { jsonrpc } from "@web/core/network/rpc_service"; +import { session } from "@web/session"; +import { useState } from "@odoo/owl"; + +patch(MessagingMenu.prototype, { + async setup() { + super.setup(); + this.state = useState({ + favoriteChannels: [], + matchedFavouriteChats: [], + }); + + // Fetch favorite channels for the current user + await this._loadFavoriteChannels(); + }, + + async _loadFavoriteChannels() { + const userDomain = [['id', '=', session.uid]]; + const userFields = ['mail_channel_ids']; + + const userData = await jsonrpc('/web/dataset/call_kw/res.users/search_read', { + model: 'res.users', + method: 'search_read', + args: [userDomain, userFields], + kwargs: {}, + }); + + if (userData?.[0]?.mail_channel_ids?.length) { + const channelIds = userData[0].mail_channel_ids; + const channelDomain = [['id', 'in', channelIds]]; + + const allFields = await jsonrpc('/web/dataset/call_kw/discuss.channel/fields_get', { + model: 'discuss.channel', + method: 'fields_get', + args: [], + kwargs: {}, + }); + + const channelFields = Object.keys(allFields); + + const channelData = await jsonrpc('/web/dataset/call_kw/discuss.channel/search_read', { + model: 'discuss.channel', + method: 'search_read', + args: [channelDomain, channelFields], + kwargs: {}, + }); + + this.state.favoriteChannels = channelData.map(channel => ({ + ...channel, + body: JSON.stringify(channel), + })); + } + }, + + async onClickFavouriteTab() { + await this._loadFavoriteChannels(); + this.store.discuss.activeTab = 'favourite'; + const records = this.store.Thread.records; + const favouriteChats = Object.values(records).filter(thread => + thread.model === "discuss.channel" && thread.favourite + ); + const favouriteChannelIds = this.state.favoriteChannels.map(channel => channel.id); + this.state.matchedFavouriteChats = favouriteChats.filter(chat => + favouriteChannelIds.includes(chat.id) + ); + }, +}); diff --git a/chat_favourites_in_systray/static/src/js/notification_item.js b/chat_favourites_in_systray/static/src/js/notification_item.js new file mode 100644 index 000000000..6006343a3 --- /dev/null +++ b/chat_favourites_in_systray/static/src/js/notification_item.js @@ -0,0 +1,67 @@ +/** @odoo-module **/ +import { NotificationItem } from "@mail/core/web/notification_item"; +import { patch } from "@web/core/utils/patch"; +import { jsonrpc } from "@web/core/network/rpc_service"; +import { session } from "@web/session"; +import { useState } from "@odoo/owl"; + +patch(NotificationItem.prototype, { + async setup() { + super.setup(); + this.state = useState({ + thread: null, + channels: [], + }); + + const thread = this.props?.slots?.icon?.__ctx?.thread; + if (thread) { + this.state.thread = thread; + } + + // Fetch user's channel IDs + const domain = [['id', '=', session.uid]]; + const fields = ['mail_channel_ids']; + + const data = await jsonrpc('/web/dataset/call_kw/res.users/search_read', { + model: 'res.users', + method: 'search_read', + args: [domain, fields], + kwargs: {}, + }); + + this.state.channels = data[0]?.mail_channel_ids || []; + // Set thread as favourite if it's in user's channels + if (this.state.thread) { + this.state.thread.favourite = this.state.channels.includes(this.state.thread.id); + } + }, + + async _onClickMarkFavourite(ev) { + const thread = this.props.slots.icon.__ctx.thread; + const starClassList = ev.target.classList; + + if (starClassList.contains('text-danger')) { + // Unmark as favourite + starClassList.remove('text-danger'); + starClassList.add('text-muted'); + + await jsonrpc('/disable_favourite', { + active_id: thread.id, + user_id: session.uid, + }); + + thread.favourite = false; + } else { + // Mark as favourite + starClassList.add('text-danger'); + starClassList.remove('text-muted'); + + await jsonrpc('/enable_favourite', { + active_id: thread.id, + user_id: session.uid, + }); + + thread.favourite = true; + } + }, +}); diff --git a/chat_favourites_in_systray/static/src/xml/systray.xml b/chat_favourites_in_systray/static/src/xml/systray.xml new file mode 100644 index 000000000..225cf07e4 --- /dev/null +++ b/chat_favourites_in_systray/static/src/xml/systray.xml @@ -0,0 +1,64 @@ + + diff --git a/chat_favourites_in_systray/views/res_users_views.xml b/chat_favourites_in_systray/views/res_users_views.xml new file mode 100644 index 000000000..152781651 --- /dev/null +++ b/chat_favourites_in_systray/views/res_users_views.xml @@ -0,0 +1,14 @@ + + + + + res.users.view.form.inherit.chat.favourites.in.systray + res.users + + + + + + + +