diff --git a/whatsapp_chat_layout/README.rst b/whatsapp_chat_layout/README.rst new file mode 100644 index 000000000..5ddd06921 --- /dev/null +++ b/whatsapp_chat_layout/README.rst @@ -0,0 +1,49 @@ +.. 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 + +Whatsapp Chat Layout in Odoo Discuss +==================================== +* Whatsapp Chat Layout in Odoo Discuss module for Odoo 18. + +Installation +============ + - www.odoo.com/documentation/17.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer:(V16) Afra M P, + (V17) Gayathri v, + (V18) Bhagyadev KP +Contact : odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@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_chat_layout/__init__.py b/whatsapp_chat_layout/__init__.py new file mode 100644 index 000000000..859927a0a --- /dev/null +++ b/whatsapp_chat_layout/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-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 models +from . import controllers diff --git a/whatsapp_chat_layout/__manifest__.py b/whatsapp_chat_layout/__manifest__.py new file mode 100644 index 000000000..7523bb429 --- /dev/null +++ b/whatsapp_chat_layout/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-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': 'Whatsapp Chat Layout in Odoo Discuss', + 'version': '18.0.1.0.0', + 'category': 'Discuss', + 'summary': 'Redesigned the discuss module into whatsapp chat layout', + 'description': 'Odoo discuss with whatsapp view', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'mail', 'base_setup', 'web'], + 'data': [ + 'views/res_config_settings.xml' + ], + 'assets': { + 'web.assets_backend': [ + 'whatsapp_chat_layout/static/src/js/discuss_container.js', + 'whatsapp_chat_layout/static/src/js/Thread.js', + 'whatsapp_chat_layout/static/src/css/discuss.css', + 'whatsapp_chat_layout/static/src/css/thread.css', + 'whatsapp_chat_layout/static/src/css/color.css', + 'whatsapp_chat_layout/static/src/js/discuss_sidebar.js', + 'whatsapp_chat_layout/static/src/xml/discuss_sidebar.xml', + 'whatsapp_chat_layout/static/src/xml/discuss_sidebar_category.xml', + 'whatsapp_chat_layout/static/src/xml/discuss_sidebar_categories_advanced.xml' + ], + }, + 'images': [ + 'static/description/banner.jpg' + ], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/whatsapp_chat_layout/controllers/__init__.py b/whatsapp_chat_layout/controllers/__init__.py new file mode 100644 index 000000000..445dba9c1 --- /dev/null +++ b/whatsapp_chat_layout/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-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_chat_layout diff --git a/whatsapp_chat_layout/controllers/whatsapp_chat_layout.py b/whatsapp_chat_layout/controllers/whatsapp_chat_layout.py new file mode 100644 index 000000000..14cbbe7b3 --- /dev/null +++ b/whatsapp_chat_layout/controllers/whatsapp_chat_layout.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-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 Color(http.Controller): + """The ProjectFilter class provides the filter option to the js. + When applying the filter returns the corresponding data.""" + + @http.route('/select_color', auth='public', type='json') + def get_color(self): + """Function to return values into js""" + colors = {'background_color': request.env[ + 'ir.config_parameter'].sudo().get_param( + 'whatsapp_chat_layout.background_color'), 'layout_color': request.env[ + 'ir.config_parameter'].sudo().get_param( + 'whatsapp_chat_layout.layout_color'), + 'background_image': request.env.user.company_id.background_image} + return colors + + @http.route('/select_user_image', auth='public', type='json') + def get_user_image(self): + """Function to get current user image and return in js""" + return request.env.user.partner_id.image_1920 diff --git a/whatsapp_chat_layout/doc/RELEASE_NOTES.md b/whatsapp_chat_layout/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..d5d0d1db6 --- /dev/null +++ b/whatsapp_chat_layout/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 22.10.2025 +#### Version 18.0.1.0.0 +#### ADD +- Initial commit for Whatsapp Chat Layout in Odoo Discuss +- \ No newline at end of file diff --git a/whatsapp_chat_layout/models/__init__.py b/whatsapp_chat_layout/models/__init__.py new file mode 100644 index 000000000..43543b6f4 --- /dev/null +++ b/whatsapp_chat_layout/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-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 res_company +from . import res_config_settings diff --git a/whatsapp_chat_layout/models/res_company.py b/whatsapp_chat_layout/models/res_company.py new file mode 100644 index 000000000..0513583dd --- /dev/null +++ b/whatsapp_chat_layout/models/res_company.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-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): + """Inherit the model res_company to store the image""" + _inherit = 'res.company' + + background_image = fields.Binary(string="Background Image", attachment=True, + help='Provide background image') diff --git a/whatsapp_chat_layout/models/res_config_settings.py b/whatsapp_chat_layout/models/res_config_settings.py new file mode 100644 index 000000000..0f56a1426 --- /dev/null +++ b/whatsapp_chat_layout/models/res_config_settings.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-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): + """Inherit the model res_config_settings to add fields""" + _inherit = 'res.config.settings' + + background_color = fields.Char(string='Background Color', + config_parameter='whatsapp_chat_layout.background_color', + default='#FFFFFF', + help='Select discuss background color') + layout_color = fields.Char(string='Layout Color', + config_parameter='whatsapp_chat_layout.layout_color', + default='#3a8180', + help='select discuss layout color') + chat_background = fields.Binary(string="Background Image", + related='company_id.background_image', + readonly=False, + help='Add background image for discuss') diff --git a/whatsapp_chat_layout/static/description/assets/icons/arrows-repeat.svg b/whatsapp_chat_layout/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/banner-1.png b/whatsapp_chat_layout/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/banner-1.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/banner-2.svg b/whatsapp_chat_layout/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/banner-bg.png b/whatsapp_chat_layout/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/banner-bg.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/banner-bg.svg b/whatsapp_chat_layout/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/banner-call.svg b/whatsapp_chat_layout/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/banner-mail.svg b/whatsapp_chat_layout/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/banner-pattern.svg b/whatsapp_chat_layout/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/banner-promo.svg b/whatsapp_chat_layout/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/brand-pair.svg b/whatsapp_chat_layout/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/check.png b/whatsapp_chat_layout/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/check.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/chevron.png b/whatsapp_chat_layout/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/chevron.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/close-icon.svg b/whatsapp_chat_layout/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/cogs.png b/whatsapp_chat_layout/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/cogs.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/collabarate-icon.svg b/whatsapp_chat_layout/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/consultation.png b/whatsapp_chat_layout/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/consultation.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/cybro-logo.png b/whatsapp_chat_layout/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/cybro-logo.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/down.svg b/whatsapp_chat_layout/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/whatsapp_chat_layout/static/description/assets/icons/ecom-black.png b/whatsapp_chat_layout/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/ecom-black.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/education-black.png b/whatsapp_chat_layout/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/education-black.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/faq.png b/whatsapp_chat_layout/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/faq.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/feature-icon.svg b/whatsapp_chat_layout/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/feature.png b/whatsapp_chat_layout/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/feature.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/gear.svg b/whatsapp_chat_layout/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/hero.gif b/whatsapp_chat_layout/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..380654dfe Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/hero.gif differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/hire-odoo.svg b/whatsapp_chat_layout/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/hotel-black.png b/whatsapp_chat_layout/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/hotel-black.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/license.png b/whatsapp_chat_layout/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/license.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/life-ring-icon.svg b/whatsapp_chat_layout/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/lifebuoy.png b/whatsapp_chat_layout/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/lifebuoy.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/mail.svg b/whatsapp_chat_layout/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/manufacturing-black.png b/whatsapp_chat_layout/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/manufacturing-black.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/notes.png b/whatsapp_chat_layout/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/notes.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/notification icon.svg b/whatsapp_chat_layout/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/odoo-consultancy.svg b/whatsapp_chat_layout/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/odoo-licencing.svg b/whatsapp_chat_layout/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/odoo-logo.png b/whatsapp_chat_layout/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/odoo-logo.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/patter.svg b/whatsapp_chat_layout/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/pattern1.png b/whatsapp_chat_layout/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/pattern1.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/pos-black.png b/whatsapp_chat_layout/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/pos-black.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/puzzle-piece-icon.svg b/whatsapp_chat_layout/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/puzzle.png b/whatsapp_chat_layout/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/puzzle.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/replace-icon.svg b/whatsapp_chat_layout/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/restaurant-black.png b/whatsapp_chat_layout/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/restaurant-black.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/screenshot-main.png b/whatsapp_chat_layout/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/screenshot-main.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/screenshot.png b/whatsapp_chat_layout/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/screenshot.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/service-black.png b/whatsapp_chat_layout/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/service-black.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/skype-fill.svg b/whatsapp_chat_layout/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/skype.png b/whatsapp_chat_layout/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/skype.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/skype.svg b/whatsapp_chat_layout/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/star-1.svg b/whatsapp_chat_layout/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/star-2.svg b/whatsapp_chat_layout/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/support.png b/whatsapp_chat_layout/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/support.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/test-1 - Copy.png b/whatsapp_chat_layout/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/test-1 - Copy.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/test-1.png b/whatsapp_chat_layout/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/test-1.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/test-2.png b/whatsapp_chat_layout/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/test-2.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/trading-black.png b/whatsapp_chat_layout/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/trading-black.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/training.png b/whatsapp_chat_layout/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/training.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/translate.svg b/whatsapp_chat_layout/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/update.png b/whatsapp_chat_layout/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/update.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/user.png b/whatsapp_chat_layout/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/user.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/video.png b/whatsapp_chat_layout/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/video.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/whatsapp.png b/whatsapp_chat_layout/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/whatsapp.png differ diff --git a/whatsapp_chat_layout/static/description/assets/icons/wrench-icon.svg b/whatsapp_chat_layout/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/whatsapp_chat_layout/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/whatsapp_chat_layout/static/description/assets/icons/wrench.png b/whatsapp_chat_layout/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/icons/wrench.png differ diff --git a/whatsapp_chat_layout/static/description/assets/modules/1.jpg b/whatsapp_chat_layout/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..0178d2964 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/modules/1.jpg differ diff --git a/whatsapp_chat_layout/static/description/assets/modules/2.jpg b/whatsapp_chat_layout/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..580ea075d Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/modules/2.jpg differ diff --git a/whatsapp_chat_layout/static/description/assets/modules/3.png b/whatsapp_chat_layout/static/description/assets/modules/3.png new file mode 100644 index 000000000..662660527 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/modules/3.png differ diff --git a/whatsapp_chat_layout/static/description/assets/modules/4.jpg b/whatsapp_chat_layout/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..cd5fffdd6 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/modules/4.jpg differ diff --git a/whatsapp_chat_layout/static/description/assets/modules/5.jpg b/whatsapp_chat_layout/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..73613d2fb Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/modules/5.jpg differ diff --git a/whatsapp_chat_layout/static/description/assets/modules/6.png b/whatsapp_chat_layout/static/description/assets/modules/6.png new file mode 100644 index 000000000..5a36b384e Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/modules/6.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/1.png b/whatsapp_chat_layout/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..32c2412c0 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/1.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/10.png b/whatsapp_chat_layout/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..c4e28af9b Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/10.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/2.png b/whatsapp_chat_layout/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..574cd7062 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/2.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/3.png b/whatsapp_chat_layout/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..4ab3dd33a Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/3.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/4.png b/whatsapp_chat_layout/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..96530841d Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/4.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/5.png b/whatsapp_chat_layout/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..3987b40e9 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/5.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/6.png b/whatsapp_chat_layout/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..c91a2c306 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/6.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/7.png b/whatsapp_chat_layout/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..982753e3a Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/7.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/8.png b/whatsapp_chat_layout/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..db9660cb4 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/8.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/9.png b/whatsapp_chat_layout/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..86b0f9e0a Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/9.png differ diff --git a/whatsapp_chat_layout/static/description/assets/screenshots/hero.gif b/whatsapp_chat_layout/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..852873182 Binary files /dev/null and b/whatsapp_chat_layout/static/description/assets/screenshots/hero.gif differ diff --git a/whatsapp_chat_layout/static/description/banner.jpg b/whatsapp_chat_layout/static/description/banner.jpg new file mode 100644 index 000000000..86409c8a9 Binary files /dev/null and b/whatsapp_chat_layout/static/description/banner.jpg differ diff --git a/whatsapp_chat_layout/static/description/icon.png b/whatsapp_chat_layout/static/description/icon.png new file mode 100644 index 000000000..7490c7485 Binary files /dev/null and b/whatsapp_chat_layout/static/description/icon.png differ diff --git a/whatsapp_chat_layout/static/description/index.html b/whatsapp_chat_layout/static/description/index.html new file mode 100644 index 000000000..bced328c6 --- /dev/null +++ b/whatsapp_chat_layout/static/description/index.html @@ -0,0 +1,1194 @@ + + + + + + Whatsapp Chat Layout in Odoo Discuss + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ Detailed Whatsapp Chat Layout in Odoo Discuss View. +

+

Whatsapp Chat Layout in Odoo Discuss +

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

Key + Highlights

+
+
+
+
+ +
+
+ Dynamically change background and Layout color. +
+

+

+
+
+
+
+
+ +
+
+ Dynamically change background image. +
+

+

+
+
+
+
+
+ +
+
+ Current user chat view in left side. +
+

+

+
+
+
+
+
+ +
+
+ Easy to Use and Manage. +
+

+

+
+
+
+
+ +
+
+
+ Whatsapp Chat Layout in Odoo Discuss. +

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

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

+ Rearranged the sidebar and the Chatter. + +

+
+
+

+

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

+ Click Mail icon to view the inbox,starred and history messages. + + +

+
+
+

+

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

+ + Click Chat icon to view the Direct messages. + +

+
+
+

+

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

+ + Click Channel icon to view the Channels. + +

+
+
+

+

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

+ + Click Start a meeting icon to start a group video call. + +

+
+
+

+

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

+ + Current user chat view in left side. + +

+
+
+

+

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

+ + Change background color and layout color in configuration settings. + +

+
+
+

+

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

+ + After Changing. + +

+
+
+

+

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

+ + Change background image in configuration settings. + +

+
+
+

+

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

+ + After Setting the Background Image. + +

+
+
+

+

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

+ Dynamically change background and Layout color. +

+
+
+

+

+
+
+
+
+
+
+
+ +
+

+ Dynamically change background image.

+
+
+

+

+
+
+
+
+
+
+
+ +
+

+ Current user chat view in left side.

+
+
+

+

+
+
+
+
+
+
+
+ +
+

+ Easy to Use and Manage.

+
+
+

+

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

+ It changes Odoo’s chat interface to a WhatsApp-style layout. +

+
+
+ +
+ +
+

+ Yes, you can change both from the configuration settings. +

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

+ Latest Release 18.0.1.0.0 +

+ + 22nd October, 2025 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • +
+
+
+
+
+
+
+
+
+
+ + + + + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/whatsapp_chat_layout/static/src/css/color.css b/whatsapp_chat_layout/static/src/css/color.css new file mode 100644 index 000000000..4697e487b --- /dev/null +++ b/whatsapp_chat_layout/static/src/css/color.css @@ -0,0 +1,23 @@ +:root{ + --background-color: #ffffff; + --layout-color: #3a8180; +} + +.o-mail-DiscussSidebarCategory{ + height: 74px; + background-color: white !important; +} +.o-mail-DiscussSidebarCategory span{ + color: black!important; +} + +.o-mail-DiscussSidebarCategory-icon{ + color: black!important; +} +.o-mail-DiscussSidebarCategory-add{ + color: black!important; +} + +i.o_DiscussSidebarCategory_command{ + color: black!important; +} \ No newline at end of file diff --git a/whatsapp_chat_layout/static/src/css/discuss.css b/whatsapp_chat_layout/static/src/css/discuss.css new file mode 100644 index 000000000..0d5bba140 --- /dev/null +++ b/whatsapp_chat_layout/static/src/css/discuss.css @@ -0,0 +1,54 @@ +.o_DiscussSidebar{ + width: 400px; +} +.o_DiscussSidebar_startAMeetingButton { + font-size: 24px; + width: 55px; + height: 65px; + background-color: #eeedee!important; + color: #979797; + border-color: #eeedee; + margin-left: 10px; + padding-top: 18px; +} + +.header { + margin-left: 200px; +} + +.text-700 { + color: gray!important; +} + +.o-mail-DiscussSidebarCategory{ + height: 74px; + background-color: var(--layout-color) !important; +} +.o-mail-DiscussSidebarCategory span{ + color: white!important; +} + +.o-mail-DiscussSidebarCategory-icon{ + color: white!important; +} +.o-mail-DiscussSidebarCategory-add{ + color: white!important; +} + +i.o_DiscussSidebarCategory_command{ + color: white!important; +} + +.o_DiscussSidebar{ + background-color: #FFFFFF!important; +} +.o-mail-ThreadIcon { + border-radius: 50%; + font-size: 34px; + padding-right: 15px; + color: var(--layout-color) !important; +} +.o-mail-DiscussSidebar-item { + color: black; + font-size: 17px; +} diff --git a/whatsapp_chat_layout/static/src/css/thread.css b/whatsapp_chat_layout/static/src/css/thread.css new file mode 100644 index 000000000..a23858ad4 --- /dev/null +++ b/whatsapp_chat_layout/static/src/css/thread.css @@ -0,0 +1,49 @@ +.o_ThreadViewTopbar { + height: 66px; + background-color: #eeedee!important; +} + +.o-mail-Thread.o_ThreadView_messageList { + background-color: var(--background-color) !important; + background-image: var(--background-image) !important; + background-repeat:no-repeat; + background-size:cover; +} +.o-mail-Thread.o_ThreadView_messageList{ + background-color: var(--background-color) !important; + background-image: var(--background-image) !important; + background-repeat:no-repeat; + background-size:cover; +} +.o_Composer{ + background-color: #eeedee!important; + height: 85px; + padding-top: 15px!important; +} + +button.o_Composer_toolButton{ + font-size: 25px; + background-color: #eeedee; +} +.o_Composer_toolButtons { + height: 50px; + background-color: #eeedee!important; +} + +button.o-mail-Composer-send.o-mail-Composer-send { + background-color: var(--layout-color) !important; + color: white; +} +.o_Message.o_MessageList_item.o_MessageList_message { + display: flex; + flex-direction: row-reverse; + justify-content: end; +} +.o_Message.o_MessageList_item.o_MessageList_message { + display: flex; + flex-direction: row-reverse; + justify-content: end; +} +.text-break { + word-break: inherit!important; +} \ No newline at end of file diff --git a/whatsapp_chat_layout/static/src/js/Thread.js b/whatsapp_chat_layout/static/src/js/Thread.js new file mode 100644 index 000000000..027da294d --- /dev/null +++ b/whatsapp_chat_layout/static/src/js/Thread.js @@ -0,0 +1,13 @@ +import { Thread } from "@mail/core/common/thread_model"; +import { patch } from "@web/core/utils/patch"; + +//Patching Thread Component +patch(Thread.prototype, { + setup() { + super.setup(...arguments); + }, + async leave() { + super.leave(...arguments); + await location.reload(); + }, +}); diff --git a/whatsapp_chat_layout/static/src/js/discuss_container.js b/whatsapp_chat_layout/static/src/js/discuss_container.js new file mode 100644 index 000000000..51fbc70b6 --- /dev/null +++ b/whatsapp_chat_layout/static/src/js/discuss_container.js @@ -0,0 +1,30 @@ +import { Discuss } from "@mail/core/public_web/discuss"; +import { patch} from "@web/core/utils/patch"; +import { rpc } from "@web/core/network/rpc"; +const { useRef } = owl; +import { onMounted } from "@odoo/owl"; + +patch(Discuss.prototype, { + setup() { + super.setup(...arguments); + this.core = useRef("core"); + onMounted(async () => { + var self = this; + await rpc('/select_color', {}).then(function(result) { + if (result.background_color !== false){ + self.core.el.style.setProperty("background-color",result.background_color + ); + } + if (result.layout_color !== false){ + document.documentElement.style.setProperty("layout-color",result.layout_color); + } + if (result.background_image !== false){ + self.core.el.style.setProperty("background-image",'url(data:image/png;base64,'+result.background_image+')',"important"); + self.core.el.style.setProperty("background-size", "cover", "important"); + self.core.el.style.setProperty("background-position", "center", "important"); + self.core.el.style.setProperty("background-repeat", "no-repeat", "important"); + } + }); + }); + }, +}); diff --git a/whatsapp_chat_layout/static/src/js/discuss_sidebar.js b/whatsapp_chat_layout/static/src/js/discuss_sidebar.js new file mode 100644 index 000000000..b453c7c23 --- /dev/null +++ b/whatsapp_chat_layout/static/src/js/discuss_sidebar.js @@ -0,0 +1,79 @@ +/** @odoo-module **/ +import { patch } from "@web/core/utils/patch"; +import { MessagingMenu } from "@mail/core/public_web/messaging_menu"; +import { DiscussSidebar } from "@mail/core/public_web/discuss_sidebar"; +import { DiscussSidebarMailboxes } from "@mail/core/web/discuss_sidebar_mailboxes"; +import { ChannelSelector } from "@mail/discuss/core/web/channel_selector"; +import { VoiceRecorder } from "@mail/discuss/voice_message/common/voice_recorder"; +import { onMounted, onWillStart, useRef } from "@odoo/owl"; +import { useState } from "@odoo/owl"; +import { rpc } from "@web/core/network/rpc"; +import { DiscussSidebarChannel } from "@mail/discuss/core/public_web/discuss_sidebar_categories"; +import { DiscussSidebarCategory } from "@mail/discuss/core/public_web/discuss_sidebar_categories"; +import { cleanTerm } from "@mail/utils/common/format"; +import { useService } from "@web/core/utils/hooks"; + +patch(DiscussSidebar.prototype, { +setup() { + super.setup(); + this.root = useRef("root") + this.state = useState({ + sidebar: 'channels', + chat: 'chats', + quickSearchVal: "", + floatingQuickSearchOpen: false + }); + this.store = useState(useService("mail.store")); + // Use the same filteredThreads logic as DiscussSidebarCategories + this.filteredThreads = (threads) => { + return threads.filter( + (thread) => + thread.displayInSidebar && + (thread.parent_channel_id || + !this.state.quickSearchVal || + cleanTerm(thread.displayName).includes(cleanTerm(this.state.quickSearchVal))) + ); + }; + + onWillStart(async () => { + await rpc('/select_color', {}).then(function(result) { + const root = document.documentElement; + if (result.background_color !== false){ + root.style.setProperty("--background-color",result.background_color); + } + }) + }); + onMounted(this.sidebar) + }, + + sidebar(){ + var self = this + rpc('/select_user_image', {}).then(function(result) { + let image = document.createElement('div') + image.innerHTML = '' + self.root.el.querySelector('#img').appendChild(image); + }); + }, + _onClickMail(ev) {// Click function of mail button + this.root.el.querySelector('.mail').classList.remove("d-none"); + this.root.el.querySelector('.channel').classList.add("d-none"); + this.root.el.querySelector('.chat').classList.add("d-none"); + }, + _onClickChat(ev) {// Click function of chat button + this.root.el.querySelector('.chat').classList.remove("d-none"); + this.root.el.querySelector('.mail').classList.add("d-none"); + this.root.el.querySelector('.channel').classList.add("d-none"); + this.state.sidebarChannel = 'chat' + }, + _onClickChannel(ev) {// Click function of channel button + this.root.el.querySelector('.channel').classList.remove("d-none"); + this.root.el.querySelector('.mail').classList.add("d-none"); + this.root.el.querySelector('.chat').classList.add("d-none"); + this.state.sidebarChat = 'channel' + }, +}); + +DiscussSidebar.components = { + ...DiscussSidebar.components, + DiscussSidebarMailboxes, ChannelSelector, MessagingMenu, DiscussSidebarCategory, VoiceRecorder, DiscussSidebarChannel +}; diff --git a/whatsapp_chat_layout/static/src/xml/composer.xml b/whatsapp_chat_layout/static/src/xml/composer.xml new file mode 100644 index 000000000..09cc8a09c --- /dev/null +++ b/whatsapp_chat_layout/static/src/xml/composer.xml @@ -0,0 +1,92 @@ + + + + + +
+
+
+
+ + + + + + +
+
+
+