diff --git a/odoo_advanced_chatter/README.rst b/odoo_advanced_chatter/README.rst new file mode 100644 index 000000000..5552d1ccd --- /dev/null +++ b/odoo_advanced_chatter/README.rst @@ -0,0 +1,52 @@ +.. 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 Advanced Chatter +===================== +* In this module, we are able to schedule log notes and send messages through chatter. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developers: + (V15) Anjhana A K, + (V16) Nihala K P, + (V17) Nihala K P, + 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 +========== + + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/odoo_advanced_chatter/__init__.py b/odoo_advanced_chatter/__init__.py new file mode 100644 index 000000000..45404c76d --- /dev/null +++ b/odoo_advanced_chatter/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Anjhana A K (odoo@cybrosys.com) +# +# 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 +from . import wizard diff --git a/odoo_advanced_chatter/__manifest__.py b/odoo_advanced_chatter/__manifest__.py new file mode 100644 index 000000000..ec9157395 --- /dev/null +++ b/odoo_advanced_chatter/__manifest__.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Anjhana A K (odoo@cybrosys.com) +# +# 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 Advanced Chatter", + "version": "15.0.1.0.0", + "category": "Discuss", + "summary": "Schedule Log note and Send Message in Chatter", + "description": """We have the capability to schedule log notes and send + messages within Chatter.Additionally, followers can be managed both from + the followers list and directly within the Schedule form.""", + "author": "Cybrosys Techno Solutions", + "company": "Cybrosys Techno Solutions", + "maintainer": "Cybrosys Techno Solutions", + "website": "https://www.cybrosys.com", + "depends": ["web", "mail"], + "data": [ + "security/ir.model.access.csv", + "data/ir_cron_data.xml", + "views/schedule_log_views.xml", + 'wizard/mail_wizard_recipients_views.xml' + ], + "assets": { + "web.assets_backend": [ + "odoo_advanced_chatter/static/src/js/composer.js", + "odoo_advanced_chatter/static/src/js/follower.js", + ], + "web.assets_qweb": [ + "odoo_advanced_chatter/static/src/xml/composer_template.xml", + "odoo_advanced_chatter/static/src/xml/follower_template.xml", + 'odoo_advanced_chatter/static/src/xml/chatter.xml' + ] + }, + "images": ["static/description/banner.jpg"], + "license": "LGPL-3", + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/odoo_advanced_chatter/data/ir_cron_data.xml b/odoo_advanced_chatter/data/ir_cron_data.xml new file mode 100644 index 000000000..9a99f2d12 --- /dev/null +++ b/odoo_advanced_chatter/data/ir_cron_data.xml @@ -0,0 +1,16 @@ + + + + + + Schedule Log Note + + code + model.schedule() + + 1 + minutes + -1 + + + \ No newline at end of file diff --git a/odoo_advanced_chatter/doc/RELEASE_NOTES.md b/odoo_advanced_chatter/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..c81255d6d --- /dev/null +++ b/odoo_advanced_chatter/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.08.2024 +#### Version 15.0.1.0.0 +#### ADD +- Initial Commit for Odoo Advanced Chatter diff --git a/odoo_advanced_chatter/models/__init__.py b/odoo_advanced_chatter/models/__init__.py new file mode 100644 index 000000000..401a745ca --- /dev/null +++ b/odoo_advanced_chatter/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Anjhana A K (odoo@cybrosys.com) +# +# 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 +from . import schedule_log diff --git a/odoo_advanced_chatter/models/mail_message.py b/odoo_advanced_chatter/models/mail_message.py new file mode 100644 index 000000000..5603d7751 --- /dev/null +++ b/odoo_advanced_chatter/models/mail_message.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-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, models + + +class MailMessage(models.Model): + """This class inherits from the `mail.message` model and extends its functionality + to customize the 'reply-to' email address based on specific conditions.""" + _inherit = "mail.message" + + @api.model + def _get_reply_to(self, values): + """ Return a specific reply_to for the document """ + model = values.get('model', self._context.get('default_model')) + res_id = values.get('res_id', + self._context.get('default_res_id')) or False + email_from = values.get('email_from') + reply_to_id = self.env['ir.config_parameter'].get_param('reply_to') + author1 = self.env['res.users'].browse(int(reply_to_id)) + self.env['ir.config_parameter'].set_param('reply_to', self.env.user.id) + email_from1 = author1.email_formatted + message_type = values.get('message_type') + records = None + if self.is_thread_message({'model': model, 'res_id': res_id, + 'message_type': message_type}): + records = self.env[model].browse([res_id]) + else: + records = self.env[model] if model else self.env['mail.thread'] + if author1.id == self.env.user: + return records._notify_get_reply_to(default=email_from)[res_id] + else: + return records._notify_get_reply_to(default=email_from1)[res_id] diff --git a/odoo_advanced_chatter/models/schedule_log.py b/odoo_advanced_chatter/models/schedule_log.py new file mode 100644 index 000000000..ebf5d6898 --- /dev/null +++ b/odoo_advanced_chatter/models/schedule_log.py @@ -0,0 +1,153 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Anjhana A K (odoo@cybrosys.com) +# +# 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 . +# +############################################################################# +import datetime +from odoo import fields, models + + +class ScheduleLog(models.Model): + """To schedule the log note""" + _name = "schedule.log" + _description = "Schedule log note in chatter" + + body = fields.Html(string="Body", help="Content of the log", required="1") + partner_ids = fields.Many2many( + "res.partner", string="Recipients", help="To whom the log is Mentioned") + time = fields.Datetime(string="Scheduled Time", required="1", + help="Time at which the log is scheduled") + attachment_ids = fields.Many2many( + comodel_name="ir.attachment", string="Attachments", help="attachments") + is_log = fields.Boolean(string="Is Log", default=False, + help="to check whether it is log note or" + " send messages",) + model = fields.Char(string="Related Model", help="Related Model") + model_reference = fields.Integer(string="Related Document Id") + status = fields.Selection( + [("draft", "Schedule"), ("post", "Post")], + string="Status", + default="draft", + help="status of the message", + ) + + def action_save(self): + """Display notification when messages are scheduled""" + if self.body: + current_time = fields.Datetime.now().replace(second=0) + scheduled_time = fields.Datetime.from_string(self.time).replace( + second=0) + time_difference = abs( + (current_time - scheduled_time).total_seconds()) + acceptable_difference = 5 + if time_difference <= acceptable_difference: + user_id = self.env.user.commercial_partner_id + partner_ids = self.partner_ids.ids + if user_id.id in self.partner_ids.ids: + partner_ids.remove(user_id.id) + model = self.env[self.model].sudo().browse(self.model_reference) + if not self.is_log: + message = model.message_post( + author_id=self.create_uid.partner_id.id, + email_from=self.create_uid.partner_id.email, + body=self.body, + attachment_ids=self.attachment_ids.ids, + ) + for mail in message.mail_ids: + mail.send() + self.status = "post" + else: + message = model.message_post( + author_id=self.create_uid.partner_id.id, + email_from=self.create_uid.partner_id.email, + body=self.body, + partner_ids=partner_ids, + attachment_ids=self.attachment_ids.ids, + message_type="comment", + subtype_xmlid="mail.mt_comment", + notify_by_email=True + ) + message.notification_ids = [fields.Command.clear()] + message.notification_ids = [ + fields.Command.create( + {"res_partner_id": pid, + "notification_type": "email" if self.is_log + else "inbox"}) + for pid in partner_ids + ] + self.status = "post" + else: + return { + "type": "ir.actions.client", + "tag": "display_notification", + "params": { + "title": "Title", + "message": "Message scheduled successfully.", + "sticky": True, + "next": {"type": "ir.actions.act_window_close"}, + }, + } + + def schedule(self): + """To schedule the log note""" + date = datetime.datetime.now() + date_sec = date.replace(second=0).strftime("%Y-%m-%d %H:%M:%S") + date_max = date.replace(second=59).strftime("%Y-%m-%d %H:%M:%S") + scheduled_lognotes = self.env["schedule.log"].search( + [ + ("time", ">=", date_sec), + ("time", "<=", date_max), + ("status", "=", "draft"), + ] + ) + for rec in scheduled_lognotes: + user_id = rec.env.user.commercial_partner_id + partner_ids = rec.partner_ids.ids + if user_id.id in rec.partner_ids.ids: + partner_ids.remove(user_id.id) + model = self.env[rec.model].sudo().browse(rec.model_reference) + if not rec.is_log: + message = model.message_post( + author_id=rec.create_uid.partner_id.id, + email_from=rec.create_uid.partner_id.email, + body=rec.body, + attachment_ids=rec.attachment_ids.ids, + ) + for mail in message.mail_ids: + mail.send() + rec.status = "post" + else: + message = model.message_post( + author_id=rec.create_uid.partner_id.id, + email_from=rec.create_uid.partner_id.email, + body=rec.body, + partner_ids=partner_ids, + attachment_ids=rec.attachment_ids.ids, + message_type="comment", + subtype_xmlid="mail.mt_comment", + ) + message.notification_ids = [fields.Command.clear()] + message.notification_ids = [ + fields.Command.create( + {"res_partner_id": pid, + "notification_type": "email" if self.is_log + else "inbox"}) + for pid in partner_ids + ] + rec.status = "post" diff --git a/odoo_advanced_chatter/security/ir.model.access.csv b/odoo_advanced_chatter/security/ir.model.access.csv new file mode 100644 index 000000000..a808801c8 --- /dev/null +++ b/odoo_advanced_chatter/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_schedule_log,access.schedule.log,model_schedule_log,base.group_user,1,1,1,1 +access_mail_wizard_recipient,access.mail.wizard.recipient,model_mail_wizard_recipient,base.group_user,1,1,1,1 diff --git a/odoo_advanced_chatter/static/description/assets/icons/check.png b/odoo_advanced_chatter/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/check.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/chevron.png b/odoo_advanced_chatter/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/chevron.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/cogs.png b/odoo_advanced_chatter/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/cogs.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/consultation.png b/odoo_advanced_chatter/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/consultation.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/ecom-black.png b/odoo_advanced_chatter/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/education-black.png b/odoo_advanced_chatter/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/education-black.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/hotel-black.png b/odoo_advanced_chatter/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/license.png b/odoo_advanced_chatter/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/license.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/lifebuoy.png b/odoo_advanced_chatter/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/manufacturing-black.png b/odoo_advanced_chatter/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/pos-black.png b/odoo_advanced_chatter/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/pos-black.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/puzzle.png b/odoo_advanced_chatter/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/puzzle.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/restaurant-black.png b/odoo_advanced_chatter/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/service-black.png b/odoo_advanced_chatter/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/service-black.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/trading-black.png b/odoo_advanced_chatter/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/trading-black.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/training.png b/odoo_advanced_chatter/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/training.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/update.png b/odoo_advanced_chatter/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/update.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/user.png b/odoo_advanced_chatter/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/user.png differ diff --git a/odoo_advanced_chatter/static/description/assets/icons/wrench.png b/odoo_advanced_chatter/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/icons/wrench.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/categories.png b/odoo_advanced_chatter/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/categories.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/check-box.png b/odoo_advanced_chatter/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/check-box.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/compass.png b/odoo_advanced_chatter/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/compass.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/corporate.png b/odoo_advanced_chatter/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/corporate.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/customer-support.png b/odoo_advanced_chatter/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/customer-support.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/cybrosys-logo.png b/odoo_advanced_chatter/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/cybrosys-logo.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/features.png b/odoo_advanced_chatter/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/features.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/logo.png b/odoo_advanced_chatter/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/logo.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/pictures.png b/odoo_advanced_chatter/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/pictures.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/pie-chart.png b/odoo_advanced_chatter/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/pie-chart.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/right-arrow.png b/odoo_advanced_chatter/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/right-arrow.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/star.png b/odoo_advanced_chatter/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/star.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/support.png b/odoo_advanced_chatter/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/support.png differ diff --git a/odoo_advanced_chatter/static/description/assets/misc/whatsapp.png b/odoo_advanced_chatter/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/misc/whatsapp.png differ diff --git a/odoo_advanced_chatter/static/description/assets/modules/1.gif b/odoo_advanced_chatter/static/description/assets/modules/1.gif new file mode 100644 index 000000000..591c8b18d Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/modules/1.gif differ diff --git a/odoo_advanced_chatter/static/description/assets/modules/2.png b/odoo_advanced_chatter/static/description/assets/modules/2.png new file mode 100644 index 000000000..6bc155887 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/modules/2.png differ diff --git a/odoo_advanced_chatter/static/description/assets/modules/3.png b/odoo_advanced_chatter/static/description/assets/modules/3.png new file mode 100644 index 000000000..3599974eb Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/modules/3.png differ diff --git a/odoo_advanced_chatter/static/description/assets/modules/4.png b/odoo_advanced_chatter/static/description/assets/modules/4.png new file mode 100644 index 000000000..f5174ab22 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/modules/4.png differ diff --git a/odoo_advanced_chatter/static/description/assets/modules/5.jpg b/odoo_advanced_chatter/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..cb354010a Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/modules/5.jpg differ diff --git a/odoo_advanced_chatter/static/description/assets/modules/6.png b/odoo_advanced_chatter/static/description/assets/modules/6.png new file mode 100644 index 000000000..9eea75430 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/modules/6.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/11.png b/odoo_advanced_chatter/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..7be9501ea Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/11.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/12.png b/odoo_advanced_chatter/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..b694a56df Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/12.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/13.png b/odoo_advanced_chatter/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..5087cb025 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/13.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/14.png b/odoo_advanced_chatter/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..78ec6e492 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/14.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/15.png b/odoo_advanced_chatter/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..d6bdc4a1a Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/15.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/16.png b/odoo_advanced_chatter/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..de3551170 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/16.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot1.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..d8ae2c986 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot1.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot10.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot10.png new file mode 100644 index 000000000..16b0f9a29 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot10.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot2.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..de405a04d Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot2.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot3.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..818ef07b3 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot3.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot4.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..67dea9df5 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot4.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot5.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot5.png new file mode 100644 index 000000000..bcd159ab0 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot5.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot6.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot6.png new file mode 100644 index 000000000..eb58ef143 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot6.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot7.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot7.png new file mode 100644 index 000000000..3c7e06abd Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot7.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot8.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot8.png new file mode 100644 index 000000000..9ef5d1aa2 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot8.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/screenshot9.png b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot9.png new file mode 100644 index 000000000..af96a4294 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/screenshot9.png differ diff --git a/odoo_advanced_chatter/static/description/assets/screenshots/v15-hero.gif b/odoo_advanced_chatter/static/description/assets/screenshots/v15-hero.gif new file mode 100644 index 000000000..f10a57691 Binary files /dev/null and b/odoo_advanced_chatter/static/description/assets/screenshots/v15-hero.gif differ diff --git a/odoo_advanced_chatter/static/description/banner.jpg b/odoo_advanced_chatter/static/description/banner.jpg new file mode 100644 index 000000000..71428f0b8 Binary files /dev/null and b/odoo_advanced_chatter/static/description/banner.jpg differ diff --git a/odoo_advanced_chatter/static/description/icon.png b/odoo_advanced_chatter/static/description/icon.png new file mode 100644 index 000000000..35d2e65f5 Binary files /dev/null and b/odoo_advanced_chatter/static/description/icon.png differ diff --git a/odoo_advanced_chatter/static/description/index.html b/odoo_advanced_chatter/static/description/index.html new file mode 100644 index 000000000..f73eb826a --- /dev/null +++ b/odoo_advanced_chatter/static/description/index.html @@ -0,0 +1,637 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Odoo Advanced Chatter

+

+ In This Module, We Are Able To Schedule Log Notes And Send + Messages Through Chatter.

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

+ Explore This Module

+
+ + + + +
+
+ +
+

+ Overview

+
+
+
+ We will get new features which will make our working easily. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + We can schedule the Log note and Messages +
+
+ + We can manage Recipients from the follower's list +
+
+ + We can manage Recipients in the Reply Mail. +
+ + +
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ An icon has been added next to the attachment icon for + scheduling messages. +

+ +
+ +
+

+ We have the capability to schedule messages and choose + recipients. +

+ + +
+ +
+

+ When the message is scheduled, we will receive a notification + confirming that the message has been + successfully scheduled. +

+ +
+ +
+

+ + Here, we can observe that the message has been sent at the + scheduled time, and the recipients are the + same as those selected in the wizard. +

+ +
+ +
+

+ When clicking the icon within the log note, we can schedule the + log note for future action. +

+ + +
+ + +
+

+ The scheduled log note can be viewed here. +

+ +
+ +
+

+ + Here, we have the option to manage followers. If we prefer not + to notify all followers, we can customize + the notification settings accordingly. +

+ +
+
+

+ In the recipient list, only the selected followers are visible. +

+ +
+
+

+ The message is only sent to the recipients listed in the + recipient list. +

+ +
+
+

+ Added new icon in the chatter to select the recipient to which + the reply mail is sent. +

+ +
+
+

+ A wizard is opened to select the recipient, After selecting the + mail we can sent the mail. +

+ +
+
+

+ Navigate to Settings -> Technical -> Messages. Here, you can + view the messages you have sent. When you open a message, the + recipient you selected will appear in the reply-to field. +

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

+ Related Products

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

+ Our Services

+
+
+
+
+
+ +
+
+ Odoo Customization
+
+
+
+ +
+
+ Odoo Implementation
+
+
+
+ +
+
+ Odoo Support
+
+
+
+ +
+
+ Hire Odoo Developer
+
+
+
+ +
+
+ Odoo Integration
+
+
+
+ +
+
+ Odoo Migration
+
+
+
+ +
+
+ Odoo Consultancy
+
+
+
+ +
+
+ Odoo Implementation
+
+
+
+ +
+
+ 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 86068 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/odoo_advanced_chatter/static/src/js/composer.js b/odoo_advanced_chatter/static/src/js/composer.js new file mode 100644 index 000000000..80c8de280 --- /dev/null +++ b/odoo_advanced_chatter/static/src/js/composer.js @@ -0,0 +1,90 @@ +/** @odoo-module **/ +import { patch } from 'web.utils'; +import { Composer } from '@mail/components/composer/composer'; +import { _t } from 'web.core'; +import { useService } from "@web/core/utils/hooks"; + + +patch(Composer.prototype, 'odoo_advanced_chatter/static/src/js/schedule_mail.js', { + setup() { + this._super(); + this.env.services.rpc({ + model: 'mail.wizard.recipient', + method: 'get_user', + args: [this.env.session.user_id[0]] + }); + }, + async _scheduleLogNote(){ + //----To manage schedule note + const composer = this.composerView.composer + const postData = this.composerView._getMessageData() + const recipient = composer.check + var followers_list=[] + $.each(composer.activeThread.followers,(index,follower) => {followers_list.push(follower.partner.id)}); + if (recipient){ + recipient.forEach(item=>{ + const index = followers_list.indexOf(item); + if (index !== -1) { + followers_list.splice(index, 1); + } + }) + } + + if (!composer.isLog){ + const action = { + type: 'ir.actions.act_window', + res_model:'schedule.log', + domain: [], + views: [ [false, "form"],[false, "list"],], + name: this.env._t("Schedule Message"), + target: 'new', + context: { + default_body:postData.body, + default_attachment_ids:postData.attachment_ids, + default_is_log:1, + default_partner_ids:followers_list, + default_model:composer.thread.model, + default_model_reference:composer.thread.id, + }, + }; + await this.env.bus.trigger('do-action', { action }); + } + else{ + const action = { + type: 'ir.actions.act_window', + res_model:'schedule.log', + domain: [], + views: [ [false, "form"],[false, "list"],], + name: this.env._t("Schedule Log"), + target: 'new', + context: { + default_body:postData.body, + default_attachment_ids:postData.attachment_ids, + default_partner_ids:followers_list, + default_is_log:0, + default_model:composer.thread.model, + default_model_reference:composer.thread.id, + }, + }; + await this.env.bus.trigger('do-action', { action }); + } + composer._reset(); + this.composerView.delete() + }, + replyTo() { + //---To manage recipients in the followers list + var userId = this.env.session.user_id[0] + const action = { + type: "ir.actions.act_window", + res_model: "mail.wizard.recipient", + view_mode: "form", + views: [[false, "form"]], + name: _t("Reply To"), + target: "new", + context: { + default_partner_id:userId, + }, + } + this.env.bus.trigger('do-action', { action }) + } +}) diff --git a/odoo_advanced_chatter/static/src/js/follower.js b/odoo_advanced_chatter/static/src/js/follower.js new file mode 100644 index 000000000..8ef099021 --- /dev/null +++ b/odoo_advanced_chatter/static/src/js/follower.js @@ -0,0 +1,18 @@ +/** @odoo-module **/ +import { patch } from 'web.utils'; +import { Follower } from '@mail/components/follower/follower'; +const message_list = []; +patch(Follower.prototype, 'odoo_advanced_chatter/static/src/js/schedule_mail.js', { + // Method to handle the checkbox click event + Check(event) { + const followerId = this.follower.partner.id; + const index = message_list.indexOf(followerId); + if (index !== -1) { + message_list.splice(index, 1); + } else { + message_list.push(followerId); + } + const shouldBeChecked = message_list.length > 0; + this.follower.followedThread.composer.check = shouldBeChecked ? message_list.slice() : false; + } +}); diff --git a/odoo_advanced_chatter/static/src/xml/chatter.xml b/odoo_advanced_chatter/static/src/xml/chatter.xml new file mode 100644 index 000000000..897a3e508 --- /dev/null +++ b/odoo_advanced_chatter/static/src/xml/chatter.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/odoo_advanced_chatter/static/src/xml/composer_template.xml b/odoo_advanced_chatter/static/src/xml/composer_template.xml new file mode 100644 index 000000000..9bbc89b0d --- /dev/null +++ b/odoo_advanced_chatter/static/src/xml/composer_template.xml @@ -0,0 +1,12 @@ + + + + + +