diff --git a/whatsapp_mail_messaging/README.rst b/whatsapp_mail_messaging/README.rst new file mode 100644 index 000000000..d6062b272 --- /dev/null +++ b/whatsapp_mail_messaging/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 Whatsapp Connector +======================= +Odoo Whatsapp connector for Sales, Invoice, and a floating button on the Website, along with icons for Whatsapp and email in the systray bar. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Lesser General Public License, Version 3 (LGPL v3) +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developers: (V13) Nishad@cybrosys, + (V14) Sayooj A O, + (V15) Midilaj V K, + (V16) Pranav T V, + (V17) Aysha Shalin + (V18) Sreerag PM + 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/whatsapp_mail_messaging/__init__.py b/whatsapp_mail_messaging/__init__.py new file mode 100644 index 000000000..f60143527 --- /dev/null +++ b/whatsapp_mail_messaging/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 controllers +from . import model +from . import wizard diff --git a/whatsapp_mail_messaging/__manifest__.py b/whatsapp_mail_messaging/__manifest__.py new file mode 100644 index 000000000..6ccc7ced1 --- /dev/null +++ b/whatsapp_mail_messaging/__manifest__.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 Whatsapp Connector', + 'version': '18.0.1.0.0', + 'category': 'Extra Tools', + 'summary': """Odoo18 Whatsapp, Whatsapp Odoo Integration, Odoo Whatsapp Connector, + Odoo Whatsapp, Whatsapp Connector, Whatsapp Integration, Odoo18, Whatsapp, + Odoo Apps""", + 'description': """Added options for sending Whatsapp messages and emails in + the systray bar, sale order, invoices, website portal view and ability to + share access URLs for documents through the share option available in each + record using WhatsApp Web.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale', 'account', 'website', 'sale_management'], + 'data': [ + 'security/ir.model.access.csv', + 'views/website_templates.xml', + 'views/sale_order_views.xml', + 'views/account_move_views.xml', + 'views/website_views.xml', + 'views/selection_message_views.xml', + 'views/res_config_settings_views.xml', + 'wizard/whatsapp_send_message_views.xml', + 'wizard/portal_share_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + "whatsapp_mail_messaging/static/src/css/icons.css", + "whatsapp_mail_messaging/static/src/js/whatsapp_icon.js", + "whatsapp_mail_messaging/static/src/js/mail_icon.js", + 'whatsapp_mail_messaging/static/src/xml/whatsapp_icon_template.xml', + 'whatsapp_mail_messaging/static/src/xml/mail_icon_template.xml', + ], + 'web.assets_frontend': [ + "whatsapp_mail_messaging/static/src/css/whatsapp_icon_website.css", + "whatsapp_mail_messaging/static/src/js/whatsapp_web_icon.js", + "whatsapp_mail_messaging/static/src/js/whatsapp_modal.js", + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/whatsapp_mail_messaging/controllers/__init__.py b/whatsapp_mail_messaging/controllers/__init__.py new file mode 100644 index 000000000..5509bf2af --- /dev/null +++ b/whatsapp_mail_messaging/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 whatsapp_mail_messaging diff --git a/whatsapp_mail_messaging/controllers/whatsapp_mail_messaging.py b/whatsapp_mail_messaging/controllers/whatsapp_mail_messaging.py new file mode 100644 index 000000000..18f7c9c07 --- /dev/null +++ b/whatsapp_mail_messaging/controllers/whatsapp_mail_messaging.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 odoo import http +from odoo.http import request + + +class SendMessage(http.Controller): + """ Controller for whatsapp message templates """ + @http.route('/whatsapp_message', type='json', auth='public') + def whatsapp_message(self, **kwargs): + """ Whatsapp message templates """ + messages = request.env['selection.message'].sudo().search_read( + fields=['name', 'message']) + return {'messages': messages} + + @http.route('/mobile_number', type='json', auth='public') + def mobile_number(self, **kwargs): + """ Mobile number of website """ + mobile_number = request.env['website'].sudo().search_read( + fields=['mobile_number'] + ) + return {'mobile': mobile_number} diff --git a/whatsapp_mail_messaging/doc/RELEASE_NOTES.md b/whatsapp_mail_messaging/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..0d0abdaec --- /dev/null +++ b/whatsapp_mail_messaging/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 30.10.2024 +#### Version 18.0.1.0.0 +##### ADD +- Initial commit for Odoo Whatsapp Connector diff --git a/whatsapp_mail_messaging/model/__init__.py b/whatsapp_mail_messaging/model/__init__.py new file mode 100644 index 000000000..1d6c4d687 --- /dev/null +++ b/whatsapp_mail_messaging/model/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 account_move +from . import res_company +from . import res_config_settings +from . import sale_order +from . import selection_message +from . import website diff --git a/whatsapp_mail_messaging/model/account_move.py b/whatsapp_mail_messaging/model/account_move.py new file mode 100644 index 000000000..d6cc7d342 --- /dev/null +++ b/whatsapp_mail_messaging/model/account_move.py @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 itertools import groupby +from odoo import models, _ +from odoo.exceptions import UserError + + +class AccountMove(models.Model): + """ + This class extends the 'account.move' model to add custom functionalities + related to WhatsApp messaging. + """ + _inherit = 'account.move' + + def action_send_whatsapp(self): + """ Action for sending whatsapp message.""" + compose_form_id = self.env.ref( + 'whatsapp_mail_messaging.whatsapp_send_message_view_form').id + ctx = dict(self.env.context) + message_template = self.company_id.whatsapp_message + default_message = ( + "Hi" + " " + self.partner_id.name + ',' + '\n' + + "Here is your invoice" + ' ' + self.name + ' ' + "amounting" + + ' ' + str(self.amount_total) + self.currency_id.symbol + ' ' + + "from " + self.company_id.name + + ". Please remit payment at your earliest convenience. " + '\n' + + "Please use the following communication for your payment" + + ' ' + self.name) + message = message_template if message_template else default_message + ctx.update({ + 'default_message': message, + 'default_partner_id': self.partner_id.id, + 'default_mobile': self.partner_id.mobile, + 'default_image_1920': self.partner_id.image_1920, + }) + return { + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'res_model': 'whatsapp.send.message', + 'views': [(compose_form_id, 'form')], + 'view_id': compose_form_id, + 'target': 'new', + 'context': ctx, + } + + def check_customers(self, partner_ids): + """ Check if the selected invoices belong to the same customer.""" + partners = groupby(partner_ids) + return next(partners, True) and not next(partners, False) + + def action_whatsapp_multi(self): + """ + Initiate WhatsApp messaging for multiple invoices and open a message + composition wizard. + """ + account_move_ids = self.env['account.move'].browse( + self.env.context.get('active_ids')) + partner_ids = [] + for account_move in account_move_ids: + partner_ids.append(account_move.partner_id.id) + partner_check = self.check_customers(partner_ids) + if partner_check: + account_move_numbers = account_move_ids.mapped('name') + account_move_numbers = "\n".join(account_move_numbers) + compose_form_id = self.env.ref( + 'whatsapp_mail_messaging.whatsapp_send_message_view_form').id + ctx = dict(self.env.context) + message = ("Hi" + " " + self.partner_id.name + ',' + '\n' + + "Your Orders are" + '\n' + account_move_numbers + ' ' + + "is ready for review.Do not hesitate to contact us if " + "you have any questions.") + ctx.update({ + 'default_message': message, + 'default_partner_id': account_move_ids[0].partner_id.id, + 'default_mobile': account_move_ids[0].partner_id.mobile, + 'default_image_1920': account_move_ids[0].partner_id.image_1920, + }) + return { + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'res_model': 'whatsapp.send.message', + 'views': [(compose_form_id, 'form')], + 'view_id': compose_form_id, + 'target': 'new', + 'context': ctx, + } + else: + raise UserError(_( + 'It appears that you have selected orders from multiple' + ' customers. Please select orders from a single customer.')) diff --git a/whatsapp_mail_messaging/model/res_company.py b/whatsapp_mail_messaging/model/res_company.py new file mode 100644 index 000000000..c982ccfbe --- /dev/null +++ b/whatsapp_mail_messaging/model/res_company.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 odoo import fields, models + + +class ResCompany(models.Model): + """ + Extends the 'res.company' model to include WhatsApp message template. + """ + _inherit = 'res.company' + + whatsapp_message = fields.Text(string="Message Template", + help="whatsapp message template") diff --git a/whatsapp_mail_messaging/model/res_config_settings.py b/whatsapp_mail_messaging/model/res_config_settings.py new file mode 100644 index 000000000..d60b7807f --- /dev/null +++ b/whatsapp_mail_messaging/model/res_config_settings.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """ + Extends the 'res.config.settings' model to include additional configuration settings. + """ + _inherit = 'res.config.settings' + + whatsapp_message = fields.Text(string="Message Template", + related='company_id.whatsapp_message', + readonly=False) diff --git a/whatsapp_mail_messaging/model/sale_order.py b/whatsapp_mail_messaging/model/sale_order.py new file mode 100644 index 000000000..9dea6adeb --- /dev/null +++ b/whatsapp_mail_messaging/model/sale_order.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 itertools import groupby +from odoo import models, _ +from odoo.exceptions import UserError + + +class SaleOrder(models.Model): + """ + This class extends the 'sale.order' model to add custom functionalities + related to WhatsApp messaging. + """ + _inherit = 'sale.order' + + def action_send_whatsapp(self): + """ Action for sending whatsapp message.""" + compose_form_id = self.env.ref( + 'whatsapp_mail_messaging.whatsapp_send_message_view_form').id + ctx = dict(self.env.context) + message_template = self.company_id.whatsapp_message + default_message = ("Hi" + " " + self.partner_id.name + ',' + '\n' + + "Your quotation" + ' ' + self.name + ' ' + "amounting" + ' ' + + str( + self.amount_total) + self.currency_id.symbol + ' ' + + "is ready for review.Do not hesitate to contact us if you " + "have any questions.") + message = message_template if message_template else default_message + ctx.update({ + 'default_message': message, + 'default_partner_id': self.partner_id.id, + 'default_mobile': self.partner_id.mobile, + 'default_image_1920': self.partner_id.image_1920, + }) + return { + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'res_model': 'whatsapp.send.message', + 'views': [(compose_form_id, 'form')], + 'view_id': compose_form_id, + 'target': 'new', + 'context': ctx, + } + + def check_customers(self, partner_ids): + """ Check if the selected sale orders belong to the same customer.""" + partners = groupby(partner_ids) + return next(partners, True) and not next(partners, False) + + def action_whatsapp_multi(self): + """ + Initiate WhatsApp messaging for multiple sale orders and open a message + composition wizard. + """ + sale_order_ids = self.env['sale.order'].browse( + self.env.context.get('active_ids')) + partner_ids = [] + for sale in sale_order_ids: + partner_ids.append(sale.partner_id.id) + partner_check = self.check_customers(partner_ids) + if partner_check: + sale_numbers = sale_order_ids.mapped('name') + sale_numbers = "\n".join(sale_numbers) + compose_form_id = self.env.ref( + 'whatsapp_mail_messaging.whatsapp_send_message_view_form').id + ctx = dict(self.env.context) + message = ("Hi" + " " + self.partner_id.name + ',' + '\n' + + "Your Orders are" + '\n' + sale_numbers + ' ' + '\n' + + "is ready for review.Do not hesitate to contact us if " + "you have any questions.") + ctx.update({ + 'default_message': message, + 'default_partner_id': sale_order_ids[0].partner_id.id, + 'default_mobile': sale_order_ids[0].partner_id.mobile, + 'default_image_1920': sale_order_ids[0].partner_id.image_1920, + }) + return { + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'res_model': 'whatsapp.send.message', + 'views': [(compose_form_id, 'form')], + 'view_id': compose_form_id, + 'target': 'new', + 'context': ctx, + } + else: + raise UserError(_( + 'It appears that you have selected orders from multiple' + ' customers. Please select orders from a single customer.')) diff --git a/whatsapp_mail_messaging/model/selection_message.py b/whatsapp_mail_messaging/model/selection_message.py new file mode 100644 index 000000000..991833ecf --- /dev/null +++ b/whatsapp_mail_messaging/model/selection_message.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 odoo import fields, models + + +class SelectionMessage(models.Model): + """ Message Templates """ + _name = 'selection.message' + _description = 'Selection Message' + + name = fields.Char(string="Name", + help="Name of message template") + message = fields.Text(string="Message", required=True, + help="The message to send") diff --git a/whatsapp_mail_messaging/model/website.py b/whatsapp_mail_messaging/model/website.py new file mode 100644 index 000000000..5d25d5d05 --- /dev/null +++ b/whatsapp_mail_messaging/model/website.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sreerag PM (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 odoo import fields, models + + +class Website(models.Model): + """ Inheriting 'website' model to add mobile number.""" + _inherit = 'website' + + mobile_number = fields.Char(string='Mobile Number') diff --git a/whatsapp_mail_messaging/security/ir.model.access.csv b/whatsapp_mail_messaging/security/ir.model.access.csv new file mode 100644 index 000000000..59424865b --- /dev/null +++ b/whatsapp_mail_messaging/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_whatsapp_send_message_user,access.whatsapp.send.message.user,model_whatsapp_send_message,base.group_user,1,1,1,1 +access_selection_message_user,access.selection.message.user,model_selection_message,base.group_user,1,1,1,1 diff --git a/whatsapp_mail_messaging/static/description/assets/cybro-icon.png b/whatsapp_mail_messaging/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/cybro-icon.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/cybro-odoo.png b/whatsapp_mail_messaging/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/cybro-odoo.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/h2.png b/whatsapp_mail_messaging/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/h2.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/arrows-repeat.svg b/whatsapp_mail_messaging/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/banner-1.png b/whatsapp_mail_messaging/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/banner-1.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/banner-2.svg b/whatsapp_mail_messaging/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/banner-bg.png b/whatsapp_mail_messaging/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/banner-bg.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/banner-bg.svg b/whatsapp_mail_messaging/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/banner-call.svg b/whatsapp_mail_messaging/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/banner-mail.svg b/whatsapp_mail_messaging/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/banner-pattern.svg b/whatsapp_mail_messaging/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/banner-promo.svg b/whatsapp_mail_messaging/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/brand-pair.svg b/whatsapp_mail_messaging/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/check.png b/whatsapp_mail_messaging/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/check.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/chevron.png b/whatsapp_mail_messaging/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/chevron.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/close-icon.svg b/whatsapp_mail_messaging/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/cogs.png b/whatsapp_mail_messaging/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/cogs.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/collabarate-icon.svg b/whatsapp_mail_messaging/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/consultation.png b/whatsapp_mail_messaging/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/consultation.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/cybro-logo.png b/whatsapp_mail_messaging/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/cybro-logo.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/down.svg b/whatsapp_mail_messaging/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/whatsapp_mail_messaging/static/description/assets/icons/ecom-black.png b/whatsapp_mail_messaging/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/ecom-black.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/education-black.png b/whatsapp_mail_messaging/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/education-black.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/faq.png b/whatsapp_mail_messaging/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/faq.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/feature-icon.svg b/whatsapp_mail_messaging/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/feature.png b/whatsapp_mail_messaging/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/feature.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/gear.svg b/whatsapp_mail_messaging/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/hero.gif b/whatsapp_mail_messaging/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..380654dfe Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/hero.gif differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/hire-odoo.svg b/whatsapp_mail_messaging/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/hotel-black.png b/whatsapp_mail_messaging/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/hotel-black.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/license.png b/whatsapp_mail_messaging/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/license.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/life-ring-icon.svg b/whatsapp_mail_messaging/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/lifebuoy.png b/whatsapp_mail_messaging/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/lifebuoy.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/mail.svg b/whatsapp_mail_messaging/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/manufacturing-black.png b/whatsapp_mail_messaging/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/manufacturing-black.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/notes.png b/whatsapp_mail_messaging/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/notes.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/notification icon.svg b/whatsapp_mail_messaging/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/odoo-consultancy.svg b/whatsapp_mail_messaging/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/odoo-licencing.svg b/whatsapp_mail_messaging/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/odoo-logo.png b/whatsapp_mail_messaging/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/odoo-logo.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/patter.svg b/whatsapp_mail_messaging/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/pattern1.png b/whatsapp_mail_messaging/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/pattern1.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/pos-black.png b/whatsapp_mail_messaging/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/pos-black.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/puzzle-piece-icon.svg b/whatsapp_mail_messaging/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/puzzle.png b/whatsapp_mail_messaging/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/puzzle.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/replace-icon.svg b/whatsapp_mail_messaging/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/restaurant-black.png b/whatsapp_mail_messaging/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/restaurant-black.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/screenshot-main.png b/whatsapp_mail_messaging/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/screenshot-main.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/screenshot.png b/whatsapp_mail_messaging/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/screenshot.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/service-black.png b/whatsapp_mail_messaging/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/service-black.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/skype-fill.svg b/whatsapp_mail_messaging/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/skype.png b/whatsapp_mail_messaging/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/skype.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/skype.svg b/whatsapp_mail_messaging/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/star-1.svg b/whatsapp_mail_messaging/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/star-2.svg b/whatsapp_mail_messaging/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/support.png b/whatsapp_mail_messaging/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/support.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/test-1 - Copy.png b/whatsapp_mail_messaging/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/test-1 - Copy.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/test-1.png b/whatsapp_mail_messaging/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/test-1.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/test-2.png b/whatsapp_mail_messaging/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/test-2.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/trading-black.png b/whatsapp_mail_messaging/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/trading-black.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/training.png b/whatsapp_mail_messaging/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/training.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/translate.svg b/whatsapp_mail_messaging/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/update.png b/whatsapp_mail_messaging/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/update.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/user.png b/whatsapp_mail_messaging/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/user.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/video.png b/whatsapp_mail_messaging/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/video.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/whatsapp.png b/whatsapp_mail_messaging/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/whatsapp.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/icons/wrench-icon.svg b/whatsapp_mail_messaging/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_mail_messaging/static/description/assets/icons/wrench.png b/whatsapp_mail_messaging/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/icons/wrench.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/modules/1.gif b/whatsapp_mail_messaging/static/description/assets/modules/1.gif new file mode 100755 index 000000000..ae3a880a2 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/modules/1.gif differ diff --git a/whatsapp_mail_messaging/static/description/assets/modules/2.gif b/whatsapp_mail_messaging/static/description/assets/modules/2.gif new file mode 100755 index 000000000..d19e2b352 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/modules/2.gif differ diff --git a/whatsapp_mail_messaging/static/description/assets/modules/3.png b/whatsapp_mail_messaging/static/description/assets/modules/3.png new file mode 100755 index 000000000..8513873ea Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/modules/3.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/modules/4.png b/whatsapp_mail_messaging/static/description/assets/modules/4.png new file mode 100755 index 000000000..3bedf7981 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/modules/4.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/modules/5.png b/whatsapp_mail_messaging/static/description/assets/modules/5.png new file mode 100755 index 000000000..0e311ca87 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/modules/5.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/modules/6.jpg b/whatsapp_mail_messaging/static/description/assets/modules/6.jpg new file mode 100755 index 000000000..67c7f7062 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/modules/6.jpg differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/1.png b/whatsapp_mail_messaging/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..23408eb04 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/1.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/10.png b/whatsapp_mail_messaging/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..d13cb9704 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/10.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/11.png b/whatsapp_mail_messaging/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..21c7672fa Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/11.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/12.png b/whatsapp_mail_messaging/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..cd1e596c5 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/12.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/13.png b/whatsapp_mail_messaging/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..3e8f57e99 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/13.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/14.png b/whatsapp_mail_messaging/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..0f250eee0 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/14.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/15.png b/whatsapp_mail_messaging/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..6697ad722 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/15.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/16.png b/whatsapp_mail_messaging/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..451bfa7f4 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/16.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/17.png b/whatsapp_mail_messaging/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..6e9a02d17 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/17.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/18.png b/whatsapp_mail_messaging/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..5914ee8df Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/18.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/19.png b/whatsapp_mail_messaging/static/description/assets/screenshots/19.png new file mode 100644 index 000000000..bc602def7 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/19.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/2.png b/whatsapp_mail_messaging/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..4a6adfd4f Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/2.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/20.png b/whatsapp_mail_messaging/static/description/assets/screenshots/20.png new file mode 100644 index 000000000..4f715deb2 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/20.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/21.png b/whatsapp_mail_messaging/static/description/assets/screenshots/21.png new file mode 100644 index 000000000..e6a485b37 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/21.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/22.png b/whatsapp_mail_messaging/static/description/assets/screenshots/22.png new file mode 100644 index 000000000..9b0058df6 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/22.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/23.png b/whatsapp_mail_messaging/static/description/assets/screenshots/23.png new file mode 100644 index 000000000..15760a1e6 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/23.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/24.png b/whatsapp_mail_messaging/static/description/assets/screenshots/24.png new file mode 100644 index 000000000..fcdb2bb67 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/24.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/25.png b/whatsapp_mail_messaging/static/description/assets/screenshots/25.png new file mode 100644 index 000000000..223d4051d Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/25.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/26.png b/whatsapp_mail_messaging/static/description/assets/screenshots/26.png new file mode 100644 index 000000000..d120c0a48 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/26.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/3.png b/whatsapp_mail_messaging/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..f11c0a9fe Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/3.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/4.png b/whatsapp_mail_messaging/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..7b1fe3ebf Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/4.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/5.png b/whatsapp_mail_messaging/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..0a696b2cf Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/5.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/6.png b/whatsapp_mail_messaging/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..3ca1c837b Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/6.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/7.png b/whatsapp_mail_messaging/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..d0bdd9732 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/7.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/8.png b/whatsapp_mail_messaging/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..69089fcca Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/8.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/9.png b/whatsapp_mail_messaging/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..26ea20ed6 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/9.png differ diff --git a/whatsapp_mail_messaging/static/description/assets/screenshots/hero.gif b/whatsapp_mail_messaging/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..4737f4796 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/screenshots/hero.gif differ diff --git a/whatsapp_mail_messaging/static/description/assets/y18.jpg b/whatsapp_mail_messaging/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/assets/y18.jpg differ diff --git a/whatsapp_mail_messaging/static/description/banner.jpg b/whatsapp_mail_messaging/static/description/banner.jpg new file mode 100644 index 000000000..19319906e Binary files /dev/null and b/whatsapp_mail_messaging/static/description/banner.jpg differ diff --git a/whatsapp_mail_messaging/static/description/icon.png b/whatsapp_mail_messaging/static/description/icon.png new file mode 100644 index 000000000..96188e536 Binary files /dev/null and b/whatsapp_mail_messaging/static/description/icon.png differ diff --git a/whatsapp_mail_messaging/static/description/index.html b/whatsapp_mail_messaging/static/description/index.html new file mode 100644 index 000000000..d26f67c37 --- /dev/null +++ b/whatsapp_mail_messaging/static/description/index.html @@ -0,0 +1,1698 @@ + + + + + + Odoo Whatsapp Connector + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ This Module Helps To Send WhatsApp Messages and + Mails from Odoo. +

+

Odoo Whatsapp Connector +

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

Key + Highlights

+
+
+
+
+ +
+
+ Send Whatsapp Messages and Mails. +
+

+ Send Whatsapp Messages and Mails from + Systray Bar,Sale Order, Invoices and Website + Portal View.

+
+
+
+
+
+ +
+
+ Added Whatsapp to the Share Options. +
+

+ Added Whatsapp to the Share Options for Sale + Orders and Invoices. +

+
+
+
+
+
+ +
+
+ Share the Access Urls of Documents. +
+

+ Share the Access Urls of Documents Using + Share Option Available in Each Records + through Whatsapp Web. +

+
+
+
+
+
+ +
+
+ Whatsapp and Mail Icon in Systray Bar. +
+

+ Icons for Whatsapp and Mail have been Added + to the Systray Bar, Allowing Users to Send + Messages by Clicking on them. +

+
+
+
+
+ +
+
+
+ Odoo Whatsapp Connector +

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

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

+ Icons for Whatsapp and Mail have been Added to the Systray Bar. + +

+
+
+

+

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

+ Create Mail from Systray Bar. + + +

+
+
+

+ Clicking on the Mail Icon will + Open a Mail Composing Screen + where We can Specify the + Content, Customer, Subject, and + Attachments. +

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

+ After Sending the Email, the Corresponding Recipients will Receive the Email. + +

+
+
+

+

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

+ Add Mobile Number. + +

+
+
+

+ We Need to Specify the Mobile + Field in the Contact Form, + Including the Country Code, to + Automatically Populate the + Mobile Number in the WhatsApp + Message Composing Wizard. +

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

+ Create Whatsapp Message from the Systray Bar. + + +

+
+
+

+ After Clicking on the WhatsApp + Icon in the SysTray, We will be + Redirected to a Message + Composing Screen Like this. +

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

+ Option to Add Emojis. + +

+
+
+

+

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

+ After Clicking 'Send', We will be Redirected to WhatsApp Web Along with Our Message. + +

+
+
+

+

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

+ The Message Entered in Odoo will be Sent to the Corresponding WhatsApp Number in our Contacts. + +

+
+
+

+

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

+ Send Invoices via WhatsApp. + +

+
+
+

+

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

+ WhatsApp Wizard in Invoice. + +

+
+
+

+ Upon Clicking the 'Send by + Whatsapp' Button, A Popup will + Appear with Auto-filled Details, + Including the Recipient, Contact + Number, and Required Content. + You can Edit these Details if + Needed. +

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

+ WhatsApp Message Template. + +

+
+
+

+ Create whatsapp message template + for sales orders and invoices. +

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

+ The Message, Along with the Details from the Popup, will be Redirected to WhatsApp Web. + +

+
+
+

+

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

+ Send Sale Orders via Whatsapp. + +

+
+
+

+

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

+ Whatsapp Wizard in Sale Order. + +

+
+
+

+ Upon Clicking the 'Send by + Whatsapp' Button, A Popup will + Appear with Auto-filled Details, + Including the Recipient, Contact + Number, and Required Content. + You can Edit these Details if + Needed. +

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

+ The message will redirect to WhatsApp Web with the details from the popup. + +

+
+
+

+

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

+ In the Website Form, Provide the Necessary Phone Number with the Country Code. + +

+
+
+

+

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

+ A WhatsApp Icon will be Available on the Website. + +

+
+
+

+

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

+ Send Custom Message. + +

+
+
+

+

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

+ Choose a Message Template. + +

+
+
+

+

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

+ Clicking on 'Send Message' will Redirect to WhatsApp Web, with the Recipient Set as the Number Specified on the Corresponding Website. + +

+
+
+

+

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

+ Share Documents Through Whatsapp. + +

+
+
+

+

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

+ Clicking on 'Share' will Reveal An Additional Option, 'Whatsapp' in the Popup Screen. Here, We can Add the Customer and Additional Contents if Needed. + +

+
+
+

+

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

+ WhatsApp Web. + +

+
+
+

+ After Clicking 'Send,' it will + First Redirect to WhatsApp Web + and then to the Corresponding + Contact in our WhatsApp, Along + with a Custom Message and a Link + for Accessing the Document. +

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

+ Send Multiple Documents through Whatsapp. + +

+
+
+

+

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

+ Multiple Documents to A Single Customer. + +

+
+
+

+ This Option Allows Us to Send + Multiple Document References to + A Single Customer. However, It's + Important to Note that We can + Only Send Documents of a Single + Customer at a Time. +

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

+ Community & Enterprise + Support.

+
+
+
+
+
+
+
+ +
+

+ Whatsapp/Mail Icon in Systray + Bar.

+
+
+
+
+
+
+
+ +
+

+ Whatsapp Floating Icon in + Website.

+
+
+

+

+
+
+
+
+
+
+
+ +
+

+ Send Documents Through + Whatsapp.

+
+
+

+

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

+ Yes, you can share + document access URLs + via WhatsApp using + the "Share" option + available in each + record. This option + is available for + documents like Sale + Orders and Invoices, + and the URL will be + shared through + WhatsApp Web. +

+
+
+ +
+ +
+

+ Yes, the module uses + WhatsApp Web to send + messages. When you + click the WhatsApp + option, it will open + WhatsApp Web in your + browser to send the + message. +

+
+ +
+ +
+

+ Currently, the + module does not + provide message + tracking for + WhatsApp messages. + However, the + messages sent will + be logged in your + WhatsApp Web + interface, just like + any other message. +

+
+
+ +
+ +
+

+ The module does not + impose any limits on + the number of + messages. However, + any restrictions + imposed by WhatsApp + or your network + provider will apply. +

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

+ Latest Release 18.0.1.0.0 +

+ + 01st October, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/whatsapp_mail_messaging/static/src/css/icons.css b/whatsapp_mail_messaging/static/src/css/icons.css new file mode 100644 index 000000000..39d553590 --- /dev/null +++ b/whatsapp_mail_messaging/static/src/css/icons.css @@ -0,0 +1,6 @@ +.mail-icon{ + color: white; + position: absolute; + right: 47px; +} + diff --git a/whatsapp_mail_messaging/static/src/css/whatsapp_icon_website.css b/whatsapp_mail_messaging/static/src/css/whatsapp_icon_website.css new file mode 100644 index 000000000..1949a1cd8 --- /dev/null +++ b/whatsapp_mail_messaging/static/src/css/whatsapp_icon_website.css @@ -0,0 +1,17 @@ +.cy_whatsapp_web{ + position:fixed; + width:60px; + height:60px; + bottom:40px; + right:40px; + background-color:#25d366; + color:#FFF; + border-radius:50px; + text-align:center; + font-size:30px; + z-index:100; +} +.cy-icon{ + margin-top:16px; + color: white; +} diff --git a/whatsapp_mail_messaging/static/src/js/mail_icon.js b/whatsapp_mail_messaging/static/src/js/mail_icon.js new file mode 100644 index 000000000..5368b2d90 --- /dev/null +++ b/whatsapp_mail_messaging/static/src/js/mail_icon.js @@ -0,0 +1,30 @@ +/** @odoo-module **/ +import { Dropdown } from '@web/core/dropdown/dropdown'; +import { DropdownItem } from '@web/core/dropdown/dropdown_item'; +import { registry } from '@web/core/registry'; +import { Component } from '@odoo/owl'; +import { useService } from "@web/core/utils/hooks"; +/* Export new class MailButton by extending Component */ +export class MailButton extends Component { + setup() { + super.setup(); + this.action = useService("action"); + } + /* On clicking mail icon */ + async onclick_mail_icon() { + this.action.doAction({ + name: "Compose Mail", + type: "ir.actions.act_window", + res_model: 'mail.mail', + views: [[false, "form"]], + view_mode: "form", + target: "new", + }); + } +} +MailButton.template = 'whatsapp_mail_messaging.mail_icon'; +MailButton.components = {Dropdown, DropdownItem}; +export const mailbutton = { + Component: MailButton, +}; +registry.category('systray').add('MailButton', mailbutton); diff --git a/whatsapp_mail_messaging/static/src/js/whatsapp_icon.js b/whatsapp_mail_messaging/static/src/js/whatsapp_icon.js new file mode 100644 index 000000000..2a9e436ba --- /dev/null +++ b/whatsapp_mail_messaging/static/src/js/whatsapp_icon.js @@ -0,0 +1,25 @@ +/** @odoo-module **/ +import { Dropdown } from '@web/core/dropdown/dropdown'; +import { DropdownItem } from '@web/core/dropdown/dropdown_item'; +import { registry } from '@web/core/registry'; +import { Component } from '@odoo/owl'; +/* Export new class WhatsappIcon by extending Component */ +export class WhatsappIcon extends Component { + /* On clicking whatsapp icon */ + async onclick_whatsapp_icon() { + this.env.services['action'].doAction({ + name: "Compose Whatsapp Message", + type: "ir.actions.act_window", + res_model: 'whatsapp.send.message', + views: [[false, "form"]], + view_mode: "form", + target: "new", + }); + } +} +WhatsappIcon.template = 'whatsapp_mail_messaging.whatsapp_icon'; +WhatsappIcon.components = { Dropdown, DropdownItem }; +export const whatsapp_icon = { + Component: WhatsappIcon, +}; +registry.category('systray').add('WhatsappIcon', whatsapp_icon); diff --git a/whatsapp_mail_messaging/static/src/js/whatsapp_modal.js b/whatsapp_mail_messaging/static/src/js/whatsapp_modal.js new file mode 100644 index 000000000..3f7765239 --- /dev/null +++ b/whatsapp_mail_messaging/static/src/js/whatsapp_modal.js @@ -0,0 +1,83 @@ +/** @odoo-module **/ +import publicWidget from "@web/legacy/js/public/public_widget"; +import { useService } from "@web/core/utils/hooks"; +//import { jsonrpc } from "@web/core/network/rpc_service"; +import { rpc } from "@web/core/network/rpc"; +// Define a new widget named 'deliveryDateToggl' that extends the 'publicWidget.Widget' class +publicWidget.registry.deliveryDateToggl = publicWidget.Widget.extend({ + selector: '#ModalWhatsapp', + events: { + 'change .custom-default': 'onclickCustomRadio', + 'change .default-default': 'onclickDefaultRadio', + 'change #myFormControl': 'onSelectChange', + 'click .btn-danger': 'onCloseButtonClick', + 'click .btn-success': 'onSendMessageClick', + }, + init() { + this._super.apply(this, arguments); + }, + // Hide the message templates if selected value is 'Custom' + onclickCustomRadio: function () { + document.querySelector('#myFormControl').style.display = "none"; + }, + // Show the message templates if selected value is 'Default' + onclickDefaultRadio: function () { + document.querySelector('#myFormControl').style.display = "block"; + let data = rpc('/whatsapp_message', {data:'data'}) + this.updateUI(data); + }, + // Updates the user interface with message templates. + updateUI: function (data) { + var selectElement = document.querySelector("#myFormControl"); + selectElement.innerHTML = ''; // Clear existing options + var defaultOption = document.createElement('option'); + defaultOption.textContent = 'Select the Template'; + selectElement.appendChild(defaultOption); // Add default option + // Add options from the data + data.then((result) => { + const messages = result.messages; + messages.forEach((message) => { + var option = document.createElement('option'); + option.value = message.id; + option.textContent = message.name; + option.setAttribute('data-message', message.message); // Save the message as a data attribute + selectElement.appendChild(option); + }); + }) + }, + // Updates the selected message templates + onSelectChange: function () { + var selectElement = document.querySelector("#myFormControl"); + var textareaElement = document.querySelector("#exampleFormControlTextarea1"); + var selectedOption = selectElement.options[selectElement.selectedIndex]; + var selectedMessage = selectedOption.getAttribute('data-message'); + textareaElement.value = selectedMessage; // Update the textarea with the message from the selected option + }, + //Closing the Modal + onCloseButtonClick: function () { + document.querySelector("#ModalWhatsapp").style.display = "none"; + }, + // Send Message to Whatsapp + onSendMessageClick: function () { + var textareaElement = document.querySelector("#exampleFormControlTextarea1"); + var messageString = textareaElement.value; + let data = rpc('/mobile_number', {data:'data'}) + data.then((result) => { + const mobile_num = result.mobile; + mobile_num.forEach((mobile) => { + // Check if 'mobile_number' is present in the first item of the 'data' array and is not falsy + if (mobile_num && mobile_num.length > 0 && 'mobile_number' in mobile_num[0] && mobile_num[0].mobile_number) { + var mobileNumber = mobile_num[0].mobile_number; + // Construct the WhatsApp URL using the mobile number and messageString + var whatsappUrl = 'https://api.whatsapp.com/send?phone=' + mobileNumber + '&text=' + encodeURIComponent(messageString); + // Open the WhatsApp URL in a new tab or window + window.open(whatsappUrl, '_blank'); + } else { + // If mobile number is not available or falsy, You might want to display a user-friendly error message on the UI" + document.querySelector("#phoneMessage").style.display = "block"; + } + }); + }) + }, +}); +export default publicWidget.registry.deliveryDateToggl; diff --git a/whatsapp_mail_messaging/static/src/js/whatsapp_web_icon.js b/whatsapp_mail_messaging/static/src/js/whatsapp_web_icon.js new file mode 100644 index 000000000..52284d708 --- /dev/null +++ b/whatsapp_mail_messaging/static/src/js/whatsapp_web_icon.js @@ -0,0 +1,17 @@ +/** @odoo-module **/ +import publicWidget from "@web/legacy/js/public/public_widget"; +// Define a new class named 'WhatsappIcon' that extends the 'publicWidget.Widget' class +publicWidget.registry.WhatsappIcon = publicWidget.Widget.extend({ + selector: '.cy_whatsapp_web', + events: { + 'click': '_onClickWhatsappIcon', + }, + start: function() { + this._super.apply(this, arguments); + }, + // Displays selection messages while clicking on whatsapp icon + _onClickWhatsappIcon: function (ev) { + $('#ModalWhatsapp').css('display', 'block'); + }, +}); +export default publicWidget.registry.WhatsappIcon; diff --git a/whatsapp_mail_messaging/static/src/xml/mail_icon_template.xml b/whatsapp_mail_messaging/static/src/xml/mail_icon_template.xml new file mode 100644 index 000000000..3ce1bbbe1 --- /dev/null +++ b/whatsapp_mail_messaging/static/src/xml/mail_icon_template.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/whatsapp_mail_messaging/static/src/xml/whatsapp_icon_template.xml b/whatsapp_mail_messaging/static/src/xml/whatsapp_icon_template.xml new file mode 100644 index 000000000..a3375ae18 --- /dev/null +++ b/whatsapp_mail_messaging/static/src/xml/whatsapp_icon_template.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/whatsapp_mail_messaging/views/account_move_views.xml b/whatsapp_mail_messaging/views/account_move_views.xml new file mode 100644 index 000000000..e6d9e67a5 --- /dev/null +++ b/whatsapp_mail_messaging/views/account_move_views.xml @@ -0,0 +1,27 @@ + + + + + account.move.view.form.inherit.whatsapp.mail.messaging + account.move + + + +