diff --git a/odoo_chatter_pin/README.rst b/odoo_chatter_pin/README.rst new file mode 100644 index 000000000..566dab124 --- /dev/null +++ b/odoo_chatter_pin/README.rst @@ -0,0 +1,45 @@ +.. 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: (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..5aa443c68 --- /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': '17.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..073ec559d --- /dev/null +++ b/odoo_chatter_pin/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 18.02.2025 +#### Version 17.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..6dda26d32 --- /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 models, fields, api + + +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/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/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/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/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/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/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/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/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.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/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/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/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/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/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/1.jpg b/odoo_chatter_pin/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..0b59ec131 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/1.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/modules/2.jpg b/odoo_chatter_pin/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..efebcb605 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/2.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/modules/3.jpg b/odoo_chatter_pin/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..1e087eed6 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/3.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/modules/4.png b/odoo_chatter_pin/static/description/assets/modules/4.png new file mode 100644 index 000000000..d324f5993 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/4.png differ diff --git a/odoo_chatter_pin/static/description/assets/modules/5.png b/odoo_chatter_pin/static/description/assets/modules/5.png new file mode 100644 index 000000000..7cea975b4 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/5.png differ diff --git a/odoo_chatter_pin/static/description/assets/modules/6.jpg b/odoo_chatter_pin/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..f0e51267e Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/modules/6.jpg differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_1.png b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_1.png new file mode 100644 index 000000000..fc0579ed7 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_1.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_2.png b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_2.png new file mode 100644 index 000000000..fdadefe21 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_2.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_3.png b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_3.png new file mode 100644 index 000000000..1a4b9f771 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_3.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_4.png b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_4.png new file mode 100644 index 000000000..314f49a50 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_4.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_5.png b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_5.png new file mode 100644 index 000000000..c971208ee Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_5.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_6.png b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_6.png new file mode 100644 index 000000000..250702c44 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_6.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_7.png b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_7.png new file mode 100644 index 000000000..6e1ea51bb Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_7.png differ diff --git a/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_8.png b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_8.png new file mode 100644 index 000000000..46d029996 Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/chatter_pin_8.png 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..3c6c46e3a Binary files /dev/null and b/odoo_chatter_pin/static/description/assets/screenshots/hero.gif 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..143bafd3b 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..54b0695f7 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..78f6cf17c --- /dev/null +++ b/odoo_chatter_pin/static/description/index.html @@ -0,0 +1,798 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Odoo Chatter Pin

+

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

+ +
+ +
+
+
+
+
+

+ 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. +

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

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

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

+ 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 , also can + view the pinned messages.

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

+ By clicking the pin icon, we can unpin 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 +
      +
    • +
    • +
    +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on: 18th February 2025 +
+

+ + Initial Commit for Odoo Chatter Pin

+
+
+
+
+
+
+
+

+ 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/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..c98843e62 --- /dev/null +++ b/odoo_chatter_pin/static/src/js/chatter.js @@ -0,0 +1,72 @@ +/** @odoo-module **/ + +import { useService } from "@web/core/utils/hooks"; +import { Chatter } from "@mail/core/web/chatter"; +import { onMounted, onWillUpdateProps } 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"); + this.notification = useService("notification"); + Object.assign(this.state, { + showPinnedMessages: false, + }); + onMounted(() => { + this.initialLoad(); + }); + onWillUpdateProps((nextProps) => { + if ( + this.props.threadId !== nextProps.threadId || + this.props.threadModel !== nextProps.threadModel + ) { + this.initialLoad(); + } + }); + }, + + async initialLoad() { + if (!this.state.thread) return; + await this.load(this.state.thread, ["messages"]); + try { + const pinnedMessages = await this.orm.searchRead( + 'mail.message', + [['is_pinned', '=', true], ['model', '=', this.props.threadModel], ['res_id', '=', this.props.threadId]], + ['id', 'body', 'author_id', 'date', 'is_pinned'], + { order: 'date DESC' } + ); + + pinnedMessages.forEach(pinnedMsg => { + const message = this.state.thread.messages.find(msg => msg.id === pinnedMsg.id); + if (message) { + message.is_pinned = true; + } + }); + } catch (error) { + console.error('Error loading pinned messages:', error); + } + }, + + get pinnedMessages() { + return this.state.thread?.messages.filter(message => message.is_pinned) ?? []; + }, + + togglePinnedMessages() { + this.state.showPinnedMessages = !this.state.showPinnedMessages; + }, + async load(thread, requestList = ["followers", "attachments", "messages", "suggestedRecipients"]) { + if (!thread.id || !this.state.thread?.eq(thread)) { + return; + } + if (this.props.hasActivities && !requestList.includes("activities")) { + requestList.push("activities"); + } + const options = { + messageFields: ['is_pinned'] + }; + await this.threadService.fetchData(thread, requestList, options); + }, +}); +Chatter.components = { ...Chatter.components, MessageCardList }; 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..bfec03cc0 --- /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; + } +}); 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..93d25e31e --- /dev/null +++ b/odoo_chatter_pin/static/src/js/pinMessage.js @@ -0,0 +1,12 @@ +/* @odoo-module */ +import { _t } from "@web/core/l10n/translation"; +import { messageActionsRegistry } from "@mail/core/common/message_actions"; + +messageActionsRegistry.add("pins", { + condition: (component) => + component.canAddReaction, + icon: "fa-thumb-tack", + title: _t("Pin"), + onClick: (component) => component.onClickPin(), + sequence: 15, +}); 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..f374c84fc --- /dev/null +++ b/odoo_chatter_pin/static/src/xml/pinnedMessages.xml @@ -0,0 +1,45 @@ + + + + + +
+
+
+
+ + Pinned Messages + + + +
+
+
+ + + +
+
+
+ + + + + + +
\ No newline at end of file