diff --git a/odoo_chatter_pin/README.rst b/odoo_chatter_pin/README.rst new file mode 100644 index 000000000..18a1eb35a --- /dev/null +++ b/odoo_chatter_pin/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Odoo Chatter Pin +===================== +This module Allows users to pin important messages or log notes in the chatter, +view pinned messages, jump to them instantly, and unpin when needed for better +message management. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V18) Nivedhya T, + (V17) Mufeeda Shirin, +* Contact: odoo@cybrosys.com + + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +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/odoo_chatter_pin/__init__.py b/odoo_chatter_pin/__init__.py new file mode 100644 index 000000000..6eeac8379 --- /dev/null +++ b/odoo_chatter_pin/__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 LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/odoo_chatter_pin/__manifest__.py b/odoo_chatter_pin/__manifest__.py new file mode 100644 index 000000000..207dd9df6 --- /dev/null +++ b/odoo_chatter_pin/__manifest__.py @@ -0,0 +1,56 @@ +# -*- 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 LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Odoo Chatter Pin', + 'version': '18.0.1.0.0', + 'category': 'Discuss', + 'summary': 'Pin and manage important messages or log notes in the chatter', + 'description': """This module allows users to pin important messages or log + notes within the chatter for quick reference. Users can e + asily view pinned messages, jump to them instantly, and + unpin them when no longer needed. The pinned items are + clearly marked with a pin icon for easy identification, + enhancing message management and improving workflow + efficiency.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['web', 'base', 'mail'], + 'data': [ + ], + "assets": { + "web.assets_backend": + [ + 'odoo_chatter_pin/static/src/css/style.css', + 'odoo_chatter_pin/static/src/xml/pinnedMessages.xml', + 'odoo_chatter_pin/static/src/js/pinMessage.js', + 'odoo_chatter_pin/static/src/js/chatter.js', + 'odoo_chatter_pin/static/src/js/message.js' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/odoo_chatter_pin/doc/RELEASE_NOTES.md b/odoo_chatter_pin/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..2a389f12a --- /dev/null +++ b/odoo_chatter_pin/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 23.07.2025 +#### Version 18.0.1.0.0 +#### ADD +- Initial Commit Odoo Chatter Pin diff --git a/odoo_chatter_pin/models/__init__.py b/odoo_chatter_pin/models/__init__.py new file mode 100644 index 000000000..49dec3601 --- /dev/null +++ b/odoo_chatter_pin/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 LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import mail_message diff --git a/odoo_chatter_pin/models/mail_message.py b/odoo_chatter_pin/models/mail_message.py new file mode 100644 index 000000000..6d6ffad2a --- /dev/null +++ b/odoo_chatter_pin/models/mail_message.py @@ -0,0 +1,49 @@ +# -*- 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 LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class Message(models.Model): + _inherit = 'mail.message' + + is_pinned = fields.Boolean(string='Pinned', default=False, index=True) + + @api.model + def message_fetch(self, domain, fields, limit=None, order='id desc'): + """Override to always include pinned status""" + if fields and 'is_pinned' not in fields: + fields.append('is_pinned') + return super().message_fetch(domain, fields, limit=limit, order=order) + + def toggle_pin(self): + """Toggle the pinned status of messages.""" + for message in self: + message.is_pinned = not message.is_pinned + self.env['bus.bus']._sendone( + f'{self._name},{message.id}', + 'mail.message/pin_changed', + { + 'id': message.id, + 'is_pinned': message.is_pinned, + } + ) + return True diff --git a/odoo_chatter_pin/static/description/assets/icons/arrows-repeat.svg b/odoo_chatter_pin/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/banner-1.png b/odoo_chatter_pin/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/banner-1.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/banner-2.svg b/odoo_chatter_pin/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/banner-bg.png b/odoo_chatter_pin/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/banner-bg.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/banner-bg.svg b/odoo_chatter_pin/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/banner-call.svg b/odoo_chatter_pin/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/banner-mail.svg b/odoo_chatter_pin/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/banner-pattern.svg b/odoo_chatter_pin/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/banner-promo.svg b/odoo_chatter_pin/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/brand-pair.svg b/odoo_chatter_pin/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/check.png b/odoo_chatter_pin/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/check.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/chevron.png b/odoo_chatter_pin/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/chevron.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/close-icon.svg b/odoo_chatter_pin/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/cogs.png b/odoo_chatter_pin/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/cogs.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/collabarate-icon.svg b/odoo_chatter_pin/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/consultation.png b/odoo_chatter_pin/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/consultation.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/cybro-logo.png b/odoo_chatter_pin/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/cybro-logo.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/down.svg b/odoo_chatter_pin/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/odoo_chatter_pin/static/description/assets/icons/ecom-black.png b/odoo_chatter_pin/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/education-black.png b/odoo_chatter_pin/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/education-black.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/faq.png b/odoo_chatter_pin/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/faq.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/feature-icon.svg b/odoo_chatter_pin/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/feature.png b/odoo_chatter_pin/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/feature.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/gear.svg b/odoo_chatter_pin/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/hire-odoo.svg b/odoo_chatter_pin/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/hotel-black.png b/odoo_chatter_pin/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/license.png b/odoo_chatter_pin/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/license.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/life-ring-icon.svg b/odoo_chatter_pin/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/lifebuoy.png b/odoo_chatter_pin/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/mail.svg b/odoo_chatter_pin/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/manufacturing-black.png b/odoo_chatter_pin/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/notes.png b/odoo_chatter_pin/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/notes.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/notification icon.svg b/odoo_chatter_pin/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/odoo-consultancy.svg b/odoo_chatter_pin/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/odoo-licencing.svg b/odoo_chatter_pin/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/odoo-logo.png b/odoo_chatter_pin/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/odoo-logo.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/patter.svg b/odoo_chatter_pin/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/pattern1.png b/odoo_chatter_pin/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/pattern1.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/pos-black.png b/odoo_chatter_pin/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/pos-black.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/puzzle-piece-icon.svg b/odoo_chatter_pin/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/puzzle.png b/odoo_chatter_pin/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/puzzle.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/replace-icon.svg b/odoo_chatter_pin/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/restaurant-black.png b/odoo_chatter_pin/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/screenshot-main.png b/odoo_chatter_pin/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/screenshot-main.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/screenshot.png b/odoo_chatter_pin/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/screenshot.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/service-black.png b/odoo_chatter_pin/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/service-black.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/skype-fill.svg b/odoo_chatter_pin/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/skype.png b/odoo_chatter_pin/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/skype.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/skype.svg b/odoo_chatter_pin/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/star-1.svg b/odoo_chatter_pin/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/star-2.svg b/odoo_chatter_pin/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/support.png b/odoo_chatter_pin/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/support.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/test-1 - Copy.png b/odoo_chatter_pin/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/test-1 - Copy.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/test-1.png b/odoo_chatter_pin/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/test-1.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/test-2.png b/odoo_chatter_pin/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/test-2.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/trading-black.png b/odoo_chatter_pin/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/trading-black.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/training.png b/odoo_chatter_pin/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/training.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/translate.svg b/odoo_chatter_pin/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/update.png b/odoo_chatter_pin/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/update.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/user.png b/odoo_chatter_pin/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/user.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/video.png b/odoo_chatter_pin/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/video.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/whatsapp.png b/odoo_chatter_pin/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/whatsapp.png differ diff --git a/odoo_chatter_pin/static/description/assets/icons/wrench-icon.svg b/odoo_chatter_pin/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/icons/wrench.png b/odoo_chatter_pin/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/icons/wrench.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/Cybrosys R.png b/odoo_chatter_pin/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/Cybrosys R.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/categories.png b/odoo_chatter_pin/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/categories.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/check-box.png b/odoo_chatter_pin/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/check-box.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/compass.png b/odoo_chatter_pin/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/compass.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/corporate.png b/odoo_chatter_pin/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/corporate.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/customer-support.png b/odoo_chatter_pin/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/customer-support.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/cybrosys-logo.png b/odoo_chatter_pin/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/cybrosys-logo.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/email.svg b/odoo_chatter_pin/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/misc/features.png b/odoo_chatter_pin/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/features.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/logo.png b/odoo_chatter_pin/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/logo.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/phone.svg b/odoo_chatter_pin/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_chatter_pin/static/description/assets/misc/pictures.png b/odoo_chatter_pin/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/pictures.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/pie-chart.png b/odoo_chatter_pin/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/pie-chart.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/right-arrow.png b/odoo_chatter_pin/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/right-arrow.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/star (1) 2.svg b/odoo_chatter_pin/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/misc/star.png b/odoo_chatter_pin/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/star.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/support (1) 1.svg b/odoo_chatter_pin/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/misc/support-email.svg b/odoo_chatter_pin/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/misc/support.png b/odoo_chatter_pin/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/support.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/tick-mark.svg b/odoo_chatter_pin/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/misc/whatsapp 1.svg b/odoo_chatter_pin/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/misc/whatsapp.png b/odoo_chatter_pin/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/misc/whatsapp.png differ diff --git a/odoo_chatter_pin/static/description/assets/misc/whatsapp.svg b/odoo_chatter_pin/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/odoo_chatter_pin/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_chatter_pin/static/description/assets/modules/banner1.jpg b/odoo_chatter_pin/static/description/assets/modules/banner1.jpg new file mode 100644 index 000000000..34cc30605 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/banner1.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/modules/banner2.jpg b/odoo_chatter_pin/static/description/assets/modules/banner2.jpg new file mode 100644 index 000000000..7dcc4fc81 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/banner2.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/modules/banner3.jpg b/odoo_chatter_pin/static/description/assets/modules/banner3.jpg new file mode 100644 index 000000000..304fbdd8f Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/banner3.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/modules/banner4.jpg b/odoo_chatter_pin/static/description/assets/modules/banner4.jpg new file mode 100644 index 000000000..ba5df27a4 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/banner4.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/modules/banner5.jpg b/odoo_chatter_pin/static/description/assets/modules/banner5.jpg new file mode 100644 index 000000000..c6ba38ebd Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/banner5.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/modules/banner6.jpg b/odoo_chatter_pin/static/description/assets/modules/banner6.jpg new file mode 100644 index 000000000..cf6a5fdb0 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/banner6.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/hero.gif b/odoo_chatter_pin/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..5538a75d2 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/screenshot1.png b/odoo_chatter_pin/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..10b965d4e Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/screenshot1.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/screenshot2.png b/odoo_chatter_pin/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..e1e553897 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/screenshot2.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/screenshot3.png b/odoo_chatter_pin/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..2ded4cc71 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/screenshot3.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/screenshot4.png b/odoo_chatter_pin/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..059b48bb7 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/screenshot4.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/screenshot5.png b/odoo_chatter_pin/static/description/assets/screenshots/screenshot5.png new file mode 100644 index 000000000..deab0a4db Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/screenshot5.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/screenshot6.png b/odoo_chatter_pin/static/description/assets/screenshots/screenshot6.png new file mode 100644 index 000000000..8148b62e1 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/screenshot6.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/screenshot7.png b/odoo_chatter_pin/static/description/assets/screenshots/screenshot7.png new file mode 100644 index 000000000..5e6f66ad6 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/screenshot7.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/screenshot8.png b/odoo_chatter_pin/static/description/assets/screenshots/screenshot8.png new file mode 100644 index 000000000..6a3271dc6 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/screenshot8.png differ diff --git a/odoo_chatter_pin/static/description/banner.jpg b/odoo_chatter_pin/static/description/banner.jpg new file mode 100644 index 000000000..5f120ad3c Binary files /dev/null and b/odoo_chatter_pin/static/description/banner.jpg differ diff --git a/odoo_chatter_pin/static/description/icon.png b/odoo_chatter_pin/static/description/icon.png new file mode 100644 index 000000000..a51008013 Binary files /dev/null and b/odoo_chatter_pin/static/description/icon.png differ diff --git a/odoo_chatter_pin/static/description/index.html b/odoo_chatter_pin/static/description/index.html new file mode 100644 index 000000000..2189c24f4 --- /dev/null +++ b/odoo_chatter_pin/static/description/index.html @@ -0,0 +1,1156 @@ + + + + + + Odoo Chatter Pin + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ Easily Pin, View, Jump to, and Unpin Important Messages or Notes in the Chatter. +

+

Odoo Chatter Pin +

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

Key + Highlights

+
+
+
+
+ +
+
+ Pin & Manage. +
+

+ Pin important + messages or log notes for easy reference. +

+
+
+
+
+
+ +
+
+ Quick Navigation. +
+

+ Jump directly to pinned messages within the + chatter. +

+
+
+
+
+
+ +
+
+ Unpin Anytime. +
+

+ Recipients + Remove pins effortlessly from the pinned + messages section. +

+
+
+
+
+ +
+
+
+ Odoo Chatter Pin +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ Pin option inside + + the chatter +

+
+
+

+ Pin option inside the chatter message and + log notes. +

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

+ A section for + + pinned messages. +

+
+
+

+ A section for pinned messages if any + messages are pinned. +

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

+ When clicking the arrow, can see the + + pinned messages. +

+
+
+

+ +

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

+ We can pin more than + + one message. +

+
+
+

+ We can pin more than one message , also can + view the pinned messages. +

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

+ Pinned messages and log notes are marked + + + with a pin icon. +

+
+
+

+ Pinned messages and log notes are marked + with a pin icon for easy + identification. +

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

+ unpin the + + + pinned message. +

+
+
+

+ By clicking the pin icon, we can unpin the + pinned message. +

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

+ jump to the + + pinned message. +

+
+
+

+ There is a jump button to jump to the pinned + message. +

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

+ Directly jumped to the + + + pinned message. +

+
+
+

+ +

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

+ Pin message or Log Notes. +

+
+
+

+ +

+
+
+
+
+
+
+
+ +
+

+ Jump to the + pinned message.

+
+
+

+ +

+
+
+
+
+
+
+
+ +
+

+ Option to Unpin the message.

+
+
+

+ +

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

+ The pin feature allows users + to mark important messages + or log notes within the chatter + so they can easily find and + reference them later. +

+
+
+ +
+ +
+

+ Click the pin icon next + to a message or log note in + the chatter. The message will + be marked as pinned and stay + easily accessible. +

+
+
+ +
+ +
+

+ Yes, simply click + the pin icon again + on a pinned message + to unpin it. + +

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

+ Latest Release 18.0.1.0.0 +

+ + 23rd July, 2025 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/odoo_chatter_pin/static/src/css/style.css b/odoo_chatter_pin/static/src/css/style.css new file mode 100644 index 000000000..f00d8b2e9 --- /dev/null +++ b/odoo_chatter_pin/static/src/css/style.css @@ -0,0 +1,9 @@ +.o-mail-PinnedMessages .card { + background-color: transparent !important; + border: none !important; + box-shadow: none !important; + } + .o-mail-PinnedMessages .card-body { + background-color: transparent !important; + +} \ No newline at end of file diff --git a/odoo_chatter_pin/static/src/js/chatter.js b/odoo_chatter_pin/static/src/js/chatter.js new file mode 100644 index 000000000..e0910e0c3 --- /dev/null +++ b/odoo_chatter_pin/static/src/js/chatter.js @@ -0,0 +1,66 @@ +/** @odoo-module **/ +import { useService } from "@web/core/utils/hooks"; +import { Chatter } from "@mail/chatter/web_portal/chatter"; +import { useEffect } from "@odoo/owl"; +import { patch } from "@web/core/utils/patch"; +import { MessageCardList } from "@mail/core/common/message_card_list"; + +patch(Chatter.prototype, { + setup() { + super.setup(); + this.orm = useService("orm"); + Object.assign(this.state, { + showPinnedMessages: false, + }); + useEffect(() => { + this.initialLoad(); + }, () => [this.props.threadId, this.props.threadModel]); + }, + + async initialLoad() { + if (!this.state.thread) { + return; + } + await this.load(this.state.thread, ["messages"]); + if (!this.state.thread?.messages) { + return; + } + + try { + const pinnedMessages = await this.orm.searchRead( + "mail.message", + [ + ["is_pinned", "=", true], + ["model", "=", this.props.threadModel], + ["res_id", "=", this.props.threadId], + ], + ["id"] + ); + + const pinnedIds = new Set(pinnedMessages.map((msg) => msg.id)); + for (const msg of this.state.thread.messages) { + msg.is_pinned = pinnedIds.has(msg.id); + } + this.state.thread.messages = [...this.state.thread.messages]; + } catch (error) { + console.error("Error loading pinned messages:", error); + } + }, + + get pinnedMessages() { + const pinned = this.state.thread?.messages?.filter((msg) => msg.is_pinned) ?? []; + return pinned; + }, + + togglePinnedMessages() { + this.state.showPinnedMessages = !this.state.showPinnedMessages; + }, + + async load(thread, requestList) { + if (!thread.id || !this.state.thread?.eq(thread)) { + return; + } + await thread.fetchData(requestList); + }, +}); +Chatter.components = { ...Chatter.components, MessageCardList }; \ No newline at end of file diff --git a/odoo_chatter_pin/static/src/js/message.js b/odoo_chatter_pin/static/src/js/message.js new file mode 100644 index 000000000..e2d5f1fe5 --- /dev/null +++ b/odoo_chatter_pin/static/src/js/message.js @@ -0,0 +1,23 @@ +/** @odoo-module */ +import { Message } from "@mail/core/common/message"; +import { patch } from "@web/core/utils/patch"; +import { useService } from "@web/core/utils/hooks"; + +patch(Message.prototype, { + setup() { + super.setup(); + this.orm = useService("orm"); + }, + async onClickPin() { + try { + await this.orm.call("mail.message", "toggle_pin", [[this.props.message.id]]); + this.props.message.is_pinned = !this.props.message.is_pinned; + } catch (error) { + console.error("Error toggling pin status:", error); + } + }, + async onMessagePin(){ + await this.orm.call("mail.message", "toggle_pin", [[this.props.message.id]]); + this.props.message.is_pinned = !this.props.message.is_pinned; + } +}); \ No newline at end of file diff --git a/odoo_chatter_pin/static/src/js/pinMessage.js b/odoo_chatter_pin/static/src/js/pinMessage.js new file mode 100644 index 000000000..d4f111c18 --- /dev/null +++ b/odoo_chatter_pin/static/src/js/pinMessage.js @@ -0,0 +1,13 @@ +/** @odoo-module **/ +import { _t } from "@web/core/l10n/translation"; +import { messageActionsRegistry } from "@mail/core/common/message_actions"; + +messageActionsRegistry.add("pin_message", { + condition: (component) => component && component.props.message, + icon: "fa fa-thumb-tack", + title: _t("Pin"), + sequence: 15, + onClick: (component) => { + component.onClickPin?.(); + }, +}); \ No newline at end of file diff --git a/odoo_chatter_pin/static/src/xml/pinnedMessages.xml b/odoo_chatter_pin/static/src/xml/pinnedMessages.xml new file mode 100644 index 000000000..a31cf5c58 --- /dev/null +++ b/odoo_chatter_pin/static/src/xml/pinnedMessages.xml @@ -0,0 +1,45 @@ + + + + + +
+
+
+
+ + Pinned Messages + + + +
+
+
+ + + +
+
+
+ + + + + + +
+ +