diff --git a/website_customer_contact/README.rst b/website_customer_contact/README.rst new file mode 100644 index 000000000..b3e0bfbaf --- /dev/null +++ b/website_customer_contact/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Website Customer Contact +========================= +This module helps you to create contact and addresses from website. +You can create,view and edit created contacts and addresses from customer portal. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License, Version 3 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: (V16): Rahul Rajeev, Jumana Jabin MP, + (V15): Aysha Shalin + 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/website_customer_contact/__init__.py b/website_customer_contact/__init__.py new file mode 100644 index 000000000..788bca549 --- /dev/null +++ b/website_customer_contact/__init__.py @@ -0,0 +1,23 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import controllers +from . import models diff --git a/website_customer_contact/__manifest__.py b/website_customer_contact/__manifest__.py new file mode 100644 index 000000000..33bb0118d --- /dev/null +++ b/website_customer_contact/__manifest__.py @@ -0,0 +1,51 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': "Website Customer Contact", + 'version': '15.0.1.0.0', + 'category': 'Website', + 'summary': """Create contact and addresses from website.""", + 'description': """This module helps you to create contact and addresses + from website. You can create,view and edit created contacts and addresses + from customer portal.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'website', 'portal'], + 'data': [ + 'views/portal_templates.xml', + 'views/website_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'website_customer_contact/static/src/css/website_customer_contact.css', + 'website_customer_contact/static/src/js/customer_contact_form.js', + 'website_customer_contact/static/src/js/customer_contact_edit_form.js', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/website_customer_contact/controllers/__init__.py b/website_customer_contact/controllers/__init__.py new file mode 100644 index 000000000..4590e57b7 --- /dev/null +++ b/website_customer_contact/controllers/__init__.py @@ -0,0 +1,24 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import contact_request +from . import portal +from . import website_customer_contact diff --git a/website_customer_contact/controllers/contact_request.py b/website_customer_contact/controllers/contact_request.py new file mode 100644 index 000000000..a557785a6 --- /dev/null +++ b/website_customer_contact/controllers/contact_request.py @@ -0,0 +1,68 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import http +from odoo.http import request + + +class WebsiteCustomerContact(http.Controller): + """" Class to create a form to create new contacts in website """ + @http.route('/contact_request_form', type="http", website=True, + auth='public') + def contact_request_form(self): + """ Render the contact request form template and pass values + to the website. """ + return http.request.render( + "website_customer_contact.website_customer_contact_request_form", + { + 'contact_title': request.env['res.partner.title'] + .sudo().search([]), + 'country_id': request.env['res.country'].sudo().search([]), + 'state_id': request.env['res.country.state'].sudo().search([]), + }) + + @http.route('/contact_request_form/submit', type="http", website=True, + auth='public') + def contact_request_form_completed(self, **kw): + """ Handle the completion of the contact request form and create a + new partner. """ + kw['parent_id'] = int(request.env.user.partner_id.id) + kw['website_id'] = int(request.website.id) + if kw['country_id']: + kw['country_id'] = int(kw['country_id']) + if kw['state_id']: + kw['state_id'] = int(kw['state_id']) + request.env['res.partner'].sudo().create(kw) + return request.render( + "website_customer_contact." + "website_customer_contact_request_form_completed") + + @http.route('/contact_request_form/write', type="http", website=True, + auth='public') + def contact_request_form_edit(self, **kw): + """ Handle editing of a contact request form and update the + corresponding partner record. """ + current_contact = request.env['res.partner'].sudo().browse( + int(kw['id'])) + current_contact.write(kw) + return request.render( + "website_customer_contact" + ".website_customer_contact_request_form_completed", {}) diff --git a/website_customer_contact/controllers/portal.py b/website_customer_contact/controllers/portal.py new file mode 100644 index 000000000..bf5d92a1e --- /dev/null +++ b/website_customer_contact/controllers/portal.py @@ -0,0 +1,35 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo.addons.portal.controllers import portal +from odoo.http import request + + +class CustomerPortal(portal.CustomerPortal): + """" Class to create a portal to website """ + def _prepare_home_portal_values(self, counters): + """" Function to super and pass value to portal """ + values = super()._prepare_home_portal_values(counters) + if 'contact_count' in counters: + values['contact_count'] = request.env['res.partner'] \ + .sudo().search_count( + [('parent_id', '=', request.env.user.partner_id.id)]) + return values diff --git a/website_customer_contact/controllers/website_customer_contact.py b/website_customer_contact/controllers/website_customer_contact.py new file mode 100644 index 000000000..ea80bcc17 --- /dev/null +++ b/website_customer_contact/controllers/website_customer_contact.py @@ -0,0 +1,50 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import http +from odoo.http import request + + +class CustomerContacts(http.Controller): + """ Class to create a route to website """ + @http.route(['/my/contacts'], type='http', auth='public', website=True) + def view_customer(self): + """ Render the customer contact template and pass values to the + website. """ + customer_contact = request.env['res.partner'].sudo().search( + [('parent_id', '=', request.env.user.partner_id.id)]) + return request.render( + 'website_customer_contact.website_customer_contact', + {'customer_contact_portal': customer_contact, + 'page_name': 'customer_contact'}) + + @http.route(['/my/contacts/'], type='http', auth='public', + website=True) + def view_customer_details(self, contact): + """ Render the customer contact details template and pass values to + the website. """ + customer_contact = request.env['res.partner'].sudo().search( + [('parent_id', '=', request.env.user.partner_id.id), + ('id', '=', contact)]) + return request.render( + 'website_customer_contact.website_customer_contact_detail', + {'customer_contact_portal': customer_contact, + 'page_name': 'customer_contact_details'}) diff --git a/website_customer_contact/doc/RELEASE_NOTES.md b/website_customer_contact/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..6a196243a --- /dev/null +++ b/website_customer_contact/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.06.2024 +#### Version 15.0.1.0.0 +##### ADD +- Initial Commit for Website Customer Contact diff --git a/website_customer_contact/models/__init__.py b/website_customer_contact/models/__init__.py new file mode 100644 index 000000000..534b57c57 --- /dev/null +++ b/website_customer_contact/models/__init__.py @@ -0,0 +1,22 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import res_partner diff --git a/website_customer_contact/models/res_partner.py b/website_customer_contact/models/res_partner.py new file mode 100644 index 000000000..642e8a41d --- /dev/null +++ b/website_customer_contact/models/res_partner.py @@ -0,0 +1,38 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, models + + +class ResPartner(models.Model): + """ Model for extending res.partner to compute display name """ + _inherit = 'res.partner' + + @api.depends('is_company', 'name', 'parent_id.display_name', 'type', + 'company_name') + def _compute_display_name(self): + """ Compute the display name for each partner """ + names = dict(self.with_context({}).name_get()) + for partner in self: + if partner.website_id: + partner.display_name = partner.name + else: + partner.display_name = names.get(partner.id) diff --git a/website_customer_contact/static/description/assets/icons/check.png b/website_customer_contact/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/check.png differ diff --git a/website_customer_contact/static/description/assets/icons/chevron.png b/website_customer_contact/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/chevron.png differ diff --git a/website_customer_contact/static/description/assets/icons/cogs.png b/website_customer_contact/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/cogs.png differ diff --git a/website_customer_contact/static/description/assets/icons/consultation.png b/website_customer_contact/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/consultation.png differ diff --git a/website_customer_contact/static/description/assets/icons/ecom-black.png b/website_customer_contact/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/ecom-black.png differ diff --git a/website_customer_contact/static/description/assets/icons/education-black.png b/website_customer_contact/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/education-black.png differ diff --git a/website_customer_contact/static/description/assets/icons/hotel-black.png b/website_customer_contact/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/hotel-black.png differ diff --git a/website_customer_contact/static/description/assets/icons/license.png b/website_customer_contact/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/license.png differ diff --git a/website_customer_contact/static/description/assets/icons/lifebuoy.png b/website_customer_contact/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/lifebuoy.png differ diff --git a/website_customer_contact/static/description/assets/icons/manufacturing-black.png b/website_customer_contact/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_customer_contact/static/description/assets/icons/pos-black.png b/website_customer_contact/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/pos-black.png differ diff --git a/website_customer_contact/static/description/assets/icons/puzzle.png b/website_customer_contact/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/puzzle.png differ diff --git a/website_customer_contact/static/description/assets/icons/restaurant-black.png b/website_customer_contact/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/restaurant-black.png differ diff --git a/website_customer_contact/static/description/assets/icons/service-black.png b/website_customer_contact/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/service-black.png differ diff --git a/website_customer_contact/static/description/assets/icons/trading-black.png b/website_customer_contact/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/trading-black.png differ diff --git a/website_customer_contact/static/description/assets/icons/training.png b/website_customer_contact/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/training.png differ diff --git a/website_customer_contact/static/description/assets/icons/update.png b/website_customer_contact/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/update.png differ diff --git a/website_customer_contact/static/description/assets/icons/user.png b/website_customer_contact/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/user.png differ diff --git a/website_customer_contact/static/description/assets/icons/wrench.png b/website_customer_contact/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/website_customer_contact/static/description/assets/icons/wrench.png differ diff --git a/website_customer_contact/static/description/assets/misc/categories.png b/website_customer_contact/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/categories.png differ diff --git a/website_customer_contact/static/description/assets/misc/check-box.png b/website_customer_contact/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/check-box.png differ diff --git a/website_customer_contact/static/description/assets/misc/compass.png b/website_customer_contact/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/compass.png differ diff --git a/website_customer_contact/static/description/assets/misc/corporate.png b/website_customer_contact/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/corporate.png differ diff --git a/website_customer_contact/static/description/assets/misc/customer-support.png b/website_customer_contact/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/customer-support.png differ diff --git a/website_customer_contact/static/description/assets/misc/cybrosys-logo.png b/website_customer_contact/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/cybrosys-logo.png differ diff --git a/website_customer_contact/static/description/assets/misc/features.png b/website_customer_contact/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/features.png differ diff --git a/website_customer_contact/static/description/assets/misc/logo.png b/website_customer_contact/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/logo.png differ diff --git a/website_customer_contact/static/description/assets/misc/pictures.png b/website_customer_contact/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/pictures.png differ diff --git a/website_customer_contact/static/description/assets/misc/pie-chart.png b/website_customer_contact/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/pie-chart.png differ diff --git a/website_customer_contact/static/description/assets/misc/right-arrow.png b/website_customer_contact/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/right-arrow.png differ diff --git a/website_customer_contact/static/description/assets/misc/star.png b/website_customer_contact/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/star.png differ diff --git a/website_customer_contact/static/description/assets/misc/support.png b/website_customer_contact/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/support.png differ diff --git a/website_customer_contact/static/description/assets/misc/whatsapp.png b/website_customer_contact/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/website_customer_contact/static/description/assets/misc/whatsapp.png differ diff --git a/website_customer_contact/static/description/assets/modules/odoo_website_helpdesk.png b/website_customer_contact/static/description/assets/modules/odoo_website_helpdesk.png new file mode 100644 index 000000000..71a8a0edc Binary files /dev/null and b/website_customer_contact/static/description/assets/modules/odoo_website_helpdesk.png differ diff --git a/website_customer_contact/static/description/assets/modules/odoo_website_helpdesk_dashboard.png b/website_customer_contact/static/description/assets/modules/odoo_website_helpdesk_dashboard.png new file mode 100644 index 000000000..52b3f0233 Binary files /dev/null and b/website_customer_contact/static/description/assets/modules/odoo_website_helpdesk_dashboard.png differ diff --git a/website_customer_contact/static/description/assets/modules/product_visibility_website.png b/website_customer_contact/static/description/assets/modules/product_visibility_website.png new file mode 100644 index 000000000..22e902092 Binary files /dev/null and b/website_customer_contact/static/description/assets/modules/product_visibility_website.png differ diff --git a/website_customer_contact/static/description/assets/modules/website_multi_product_return_management.png b/website_customer_contact/static/description/assets/modules/website_multi_product_return_management.png new file mode 100644 index 000000000..9bd504b22 Binary files /dev/null and b/website_customer_contact/static/description/assets/modules/website_multi_product_return_management.png differ diff --git a/website_customer_contact/static/description/assets/modules/website_product_attachments.png b/website_customer_contact/static/description/assets/modules/website_product_attachments.png new file mode 100644 index 000000000..ea1f49f20 Binary files /dev/null and b/website_customer_contact/static/description/assets/modules/website_product_attachments.png differ diff --git a/website_customer_contact/static/description/assets/modules/website_return_management.png b/website_customer_contact/static/description/assets/modules/website_return_management.png new file mode 100644 index 000000000..c43739627 Binary files /dev/null and b/website_customer_contact/static/description/assets/modules/website_return_management.png differ diff --git a/website_customer_contact/static/description/assets/screenshots/1.png b/website_customer_contact/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..4b92e367b Binary files /dev/null and b/website_customer_contact/static/description/assets/screenshots/1.png differ diff --git a/website_customer_contact/static/description/assets/screenshots/2.png b/website_customer_contact/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..a2692e80d Binary files /dev/null and b/website_customer_contact/static/description/assets/screenshots/2.png differ diff --git a/website_customer_contact/static/description/assets/screenshots/3.png b/website_customer_contact/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..9b3c9b648 Binary files /dev/null and b/website_customer_contact/static/description/assets/screenshots/3.png differ diff --git a/website_customer_contact/static/description/assets/screenshots/4.png b/website_customer_contact/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..61cb42f1f Binary files /dev/null and b/website_customer_contact/static/description/assets/screenshots/4.png differ diff --git a/website_customer_contact/static/description/assets/screenshots/5.png b/website_customer_contact/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..bcaa6a009 Binary files /dev/null and b/website_customer_contact/static/description/assets/screenshots/5.png differ diff --git a/website_customer_contact/static/description/assets/screenshots/hero.gif b/website_customer_contact/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..88099cd71 Binary files /dev/null and b/website_customer_contact/static/description/assets/screenshots/hero.gif differ diff --git a/website_customer_contact/static/description/banner.png b/website_customer_contact/static/description/banner.png new file mode 100644 index 000000000..3e9542363 Binary files /dev/null and b/website_customer_contact/static/description/banner.png differ diff --git a/website_customer_contact/static/description/icon.png b/website_customer_contact/static/description/icon.png new file mode 100644 index 000000000..d8af21147 Binary files /dev/null and b/website_customer_contact/static/description/icon.png differ diff --git a/website_customer_contact/static/description/index.html b/website_customer_contact/static/description/index.html new file mode 100644 index 000000000..34c673da7 --- /dev/null +++ b/website_customer_contact/static/description/index.html @@ -0,0 +1,666 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ odoo.sh +
+
+
+ +
+
+
+ +

+ Website Customer Contact

+

+ This Module Helps you + to Create, View and Edit Contact and Addresses from Website.

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module helps you to create contact and addresses from website. You can create,view and edit created contacts and addresses + from customer portal. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Add Contacts & Addresses on your account. +
+
+
+
+ + Create and Edit Contacts & Addresses. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Contact Request +

+

+ Go to Website -> + User Dropdown + -> + Contact Request.

+ +

+ In the form view ,fill the contact details, and also we can + choose the type of contact from the "Type" field .A contact + will be created after the form is submitted. +

+ +
+
+

+ Customer Contact +

+

+ Go to Website -> + User Dropdown + -> + My Account -> Contacts. + You can get the following information for each contact: Name, + Type, Email, and Phone. + By clicking the person's name, you can also get their contact + information. +

+ +
+
+

+ Customer Contact + Details +

+

+ You can get the relevant Name, Email, Phone, Mobile, Addresses, + Title, Job Position, and Notes for the chosen contact and can be edited. +

+ +
+
+

+ Edit Contact + Details +

+

+ You can make changes in the created contact details. +

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

+ Related + Products +

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

+ Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/website_customer_contact/static/src/css/website_customer_contact.css b/website_customer_contact/static/src/css/website_customer_contact.css new file mode 100644 index 000000000..efe4a58aa --- /dev/null +++ b/website_customer_contact/static/src/css/website_customer_contact.css @@ -0,0 +1,105 @@ +a#myModal{ + margin-top: -56px; + margin-left: 1137px; +} +@media screen and (max-width: 1600px) { + .modal.show .modal-dialog{ + max-height:56% !important; + } +} +@media screen and (max-width: 991px) { + .modal.show .modal-dialog{ + max-height:56% !important; + } +} +@media screen and (max-width: 768px) { + .form-field .col-md-3 + text-align:left !important; + } + .form-field .o_website_form_input{ + width:96% !important; + } + .modal-body{ + background-color:#fff; + } + .modal.show .modal-dialog{ + max-height:50% !important; + } + .contact_form{ + width:100% !important; + } +} +@media screen and (max-width: 500px) { + a#myModal{ + margin-top: -47px; + margin-left: 182px; + } + .modal-dialog.modal-content{ + min-height: 440px !important; + max-width: 100% !important; + } + .contact_form form label{ + width:48% !important; + } + .contact_form form .form-control { + width: 100% !important; +} +} +.btn-add-contact{ + background: none; + border: none; +} +.btn-add-contact a{ + color: white !important; + padding: 0px 36px !important; + height: 36px !important; + display: flex; + align-items: center; + outline: none !important; + border-radius: 9px; + box-shadow: none; + background-color: #35979c; + } + .o_popup_btn_close{ + color: #FFFFFF; + background-color: #35979c; + border-color: #35979c; + font-size:1rem !important; + margin-left:9px; + } + .o_popup_btn_close:hover{ + color:#fff !important; + background-color:#2d8084; + } + a#myModal{ + position: absolute; + right: 17px; + top: 12px; + margin:0px !important; + } +.contact_form{ + margin: auto; + width: 750px; +} +.contact_form .form-group{ + margin-bottom:16px; +} +.contact_form form label { + font-weight: 700; + float: left; + width: 17%; +} +.contact_form form .form-control { + width:83%; +} +.contact-success{ + width: 369px; + margin: auto; + margin-top: 14%; + font-size:18px; + border-radius:43px; +} +.contact-success span{ + padding-right:7px; + font-size:22px; +} diff --git a/website_customer_contact/static/src/js/customer_contact_edit_form.js b/website_customer_contact/static/src/js/customer_contact_edit_form.js new file mode 100644 index 000000000..7db1f5a63 --- /dev/null +++ b/website_customer_contact/static/src/js/customer_contact_edit_form.js @@ -0,0 +1,35 @@ +odoo.define("website_customer_contact.customer_contact_edit_form", + function (require) { + "use strict"; + let publicWidget = require("web.public.widget"); + const { _t } = require("web.core"); + const Dialog = require("web.Dialog"); + // Odoo customer contact form widget. + publicWidget.registry.WebsiteCustomerEditContactRequestForm = publicWidget.Widget.extend({ + selector: ".customer_contact_edit_form", + events: { + "input #phone": "validateNumber", + "input #mobile_number": "validateNumber", + }, + // Validate the input value of the #phone field to ensure it contains only valid numbers. + validateNumber: function (ev) { + const input = this.$(ev.currentTarget); + if (!/^\d+$/.test(input.val())) { + this.$("#warranty_submit").attr("disabled", "disabled"); + return new Dialog(null, { + title: "Error:", + size: "medium", + $content: `

${ + _.str.escapeHTML("Enter Valid Number ") || "" + }

`, + buttons: [{ text: _t("Ok"), close: true }], + }).open(); + } else { + this.$("#warranty_submit").removeAttr("disabled"); + } + return; + }, + }); + return publicWidget; + } +); diff --git a/website_customer_contact/static/src/js/customer_contact_form.js b/website_customer_contact/static/src/js/customer_contact_form.js new file mode 100644 index 000000000..4ae31e9e8 --- /dev/null +++ b/website_customer_contact/static/src/js/customer_contact_form.js @@ -0,0 +1,77 @@ +odoo.define("website_customer_contact.customer_contact_form", function (require) { + "use strict"; + let publicWidget = require("web.public.widget"); + const { _t } = require("web.core"); + const Dialog = require("web.Dialog"); + publicWidget.registry.WebsiteCustomerContactRequestForm = publicWidget.Widget.extend({ + selector: ".customer_contact_form", + events: { + "change .select_box_test": "_onChangeType", + "change .country_select": "_onChangeCountry", + "input #phone_number": "validateNumber", + "input #mobile_number": "validateNumber", + }, + // Onchange of customer type, fields to fill varies + _onChangeType: function (ev) { + let select = this.$(ev.currentTarget); + let selectedValue = select.val(); + if (selectedValue === "contact") { + this.$el.find(".job_position").show(); + this.$el.find(".contact_title").show(); + this.$el.find(".street").hide(); + this.$el.find(".street2").hide(); + this.$el.find(".city").hide(); + this.$el.find(".zip").hide(); + this.$el.find(".state_id").hide(); + this.$el.find(".country_id").hide(); + } else { + this.$el.find(".job_position").hide(); + this.$el.find(".contact_title").hide(); + this.$el.find(".street").show(); + this.$el.find(".street2").show(); + this.$el.find(".city").show(); + this.$el.find(".zip").show(); + this.$el.find(".state_id").show(); + this.$el.find(".country_id").show(); + } + }, + /** + * Handle the onchange event for the country selection. + * Show only the states of the selected country and hide others. + */ + _onChangeCountry: function (ev) { + let selected_country = + this.$el.find(".country_select")[0].selectedOptions[0].innerText; + let state = this.$el.find(".state_select_option"); + for (let i = 0; i < state.length; i++) { + state[i].style["display"] = ""; + if (state[i].dataset["id"] != selected_country) { + state[i].style["display"] = "none"; + } + } + }, + /** + * Validate the input value of the phone and mobile number fields to ensure they contain only valid numbers. + * If an invalid number is entered, it displays an error dialog with a corresponding message. + */ + validateNumber: function (ev) { + const input = this.$(ev.currentTarget); + if (!/^\d+$/.test(input.val())) { + this.$("#contact_request_form_submit").attr("disabled", "disabled"); + return new Dialog(null, { + title: "Error:", + size: "medium", + $content: `

${ + _.str.escapeHTML("Enter Valid Number ") || "" + }

`, + buttons: [{ text: _t("Ok"), close: true }], + }).open(); + } else { + this.$("#contact_request_form_submit").removeAttr("disabled"); + } + return; + }, + }); + return publicWidget; + } +); diff --git a/website_customer_contact/views/portal_templates.xml b/website_customer_contact/views/portal_templates.xml new file mode 100644 index 000000000..91126972f --- /dev/null +++ b/website_customer_contact/views/portal_templates.xml @@ -0,0 +1,315 @@ + + + + + + + + diff --git a/website_customer_contact/views/website_templates.xml b/website_customer_contact/views/website_templates.xml new file mode 100644 index 000000000..28ae18630 --- /dev/null +++ b/website_customer_contact/views/website_templates.xml @@ -0,0 +1,198 @@ + + + + +