diff --git a/website_portal_rfq/README.rst b/website_portal_rfq/README.rst new file mode 100755 index 000000000..1c8b7b89d --- /dev/null +++ b/website_portal_rfq/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +RFQ From Portal +=============== +* This module helps to create quotations from portal in odoo16. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE v3.0 (AGPL-3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: (V16): Sruthi M Kumar , 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_portal_rfq/__init__.py b/website_portal_rfq/__init__.py new file mode 100755 index 000000000..eed8e6706 --- /dev/null +++ b/website_portal_rfq/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 diff --git a/website_portal_rfq/__manifest__.py b/website_portal_rfq/__manifest__.py new file mode 100755 index 000000000..5e2180b97 --- /dev/null +++ b/website_portal_rfq/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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': 'RFQ From Portal', + 'version': '16.0.1.0.0', + 'category': 'eCommerce', + 'summary': 'Customers can create quotations from customer portal', + 'description': 'Customers can use the portal to send a request for a ' + 'quotation.They can add a single or multiple products. ' + 'They can also add notes.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale_management', 'account', 'website'], + 'data': [ + 'views/portal_rfq_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'website_portal_rfq/static/src/js/customer_portal.js', + 'website_portal_rfq/static/src/css/website_rfq.css', + 'https://unpkg.com/sweetalert/dist/sweetalert.min.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/website_portal_rfq/controllers/__init__.py b/website_portal_rfq/controllers/__init__.py new file mode 100755 index 000000000..9cd239287 --- /dev/null +++ b/website_portal_rfq/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from . import website_portal_rfq diff --git a/website_portal_rfq/controllers/website_portal_rfq.py b/website_portal_rfq/controllers/website_portal_rfq.py new file mode 100755 index 000000000..53a41a40d --- /dev/null +++ b/website_portal_rfq/controllers/website_portal_rfq.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 +from odoo.addons.portal.controllers import portal + + +class CustomerPortal(portal.CustomerPortal): + """Helps to manage the customer portal controller""" + + def _prepare_home_portal_values(self, counters): + """Update count of document to None""" + values = super()._prepare_home_portal_values(counters) + if 'qtn_count' in counters: + values['qtn_count'] = None + return values + + @http.route( + ['/my/quotation_request', '/my/quotation_request/page/'], + type='http', auth="user", + website=True) + def portal_my_mo(self): + """Returns quotation template with values.""" + values = self._prepare_portal_layout_values() + values.update({ + 'page_name': 'rfq_p', + 'login_partner': request.env.user.partner_id, + 'partners': request.env['res.partner'].search([]), + 'default_url': '/my/quotation_request', + }) + return request.render( + "website_portal_rfq.portal_my_rfq_requests", + values) + + @http.route(['/my/send_request'], type="http", auth="public", website=True) + def button_send_request(self, **kw): + """Create a new quotation by submitting the request from the portal""" + login_partner = request.env.user.partner_id + partner_address = request.env['res.partner'].browse( + [int(kw.get('address1', 0)), int(kw.get('address2', 0))]) + price_list = login_partner.property_product_pricelist + order_lines = [(0, 0, { + 'product_id': product.id, + 'product_template_id': product.product_tmpl_id.id, + 'product_uom': request.env['uom.uom'].sudo().browse( + int(kw.get('uom_' + key.split('_')[1]))).id, + 'price_unit': price_list._get_product_price(product, float(kw.get( + 'quantity_' + key.split('_')[ + 1]))) if price_list else product.list_price, + 'product_uom_qty': kw.get('quantity_' + key.split('_')[1]), + }) for key, value in kw.items() if key.startswith('product_') for + product in + [request.env['product.product'].sudo().browse( + int(value))]] + if len(partner_address) == 2 and order_lines: + sale_order = request.env['sale.order'].sudo().create({ + 'partner_id': login_partner.id, + 'partner_invoice_id': partner_address[0].id, + 'partner_shipping_id': partner_address[1].id, + 'note': kw.get('description'), + 'order_line': order_lines, + 'pricelist_id': price_list.id if price_list else False, + }) + if sale_order: + return request.render('quotation.thanks', + {'sale_order': sale_order.name}) + return request.redirect('/my/quotation_request') + + @http.route( + ['/my/product_details'], + type='json', auth="user", + website=True) + def portal_product(self): + """When add new product from portal the function will return the + selected product from product.product""" + products = request.env['product.product'].sudo().search( + [('sale_ok', '=', True)]) + return {'product_id': [[product.display_name, product.id] for product in + products]} + + @http.route('/my/product_uom', type='json', auth="public", methods=['POST'], + website=True) + def get_product_uom(self, product_id=None, **kw): + """Get Unit of measures based on the product""" + if product_id: + product = request.env['product.product'].sudo().browse( + int(product_id)) + if product: + uom_options = [(uom.id, uom.name) for uom in + product.uom_id.category_id.uom_ids] + return { + 'uom_ids': uom_options, + } + + @http.route( + ['/my/product_image'], + type='json', auth="user", + website=True, csrf=False) + def portal_product_image(self, **kw): + """When onchange the product, it will call this function to get + the image of the product""" + if kw.get('onchange_product_id'): + return request.env['product.product'].sudo().browse( + int(kw.get('onchange_product_id'))).image_1920 diff --git a/website_portal_rfq/doc/RELEASE_NOTES.md b/website_portal_rfq/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..f4f93d357 --- /dev/null +++ b/website_portal_rfq/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 09.01.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial Commit for RFQ From Portal \ No newline at end of file diff --git a/website_portal_rfq/static/description/assets/icons/check.png b/website_portal_rfq/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/check.png differ diff --git a/website_portal_rfq/static/description/assets/icons/chevron.png b/website_portal_rfq/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/chevron.png differ diff --git a/website_portal_rfq/static/description/assets/icons/cogs.png b/website_portal_rfq/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/cogs.png differ diff --git a/website_portal_rfq/static/description/assets/icons/consultation.png b/website_portal_rfq/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/consultation.png differ diff --git a/website_portal_rfq/static/description/assets/icons/ecom-black.png b/website_portal_rfq/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/ecom-black.png differ diff --git a/website_portal_rfq/static/description/assets/icons/education-black.png b/website_portal_rfq/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/education-black.png differ diff --git a/website_portal_rfq/static/description/assets/icons/hotel-black.png b/website_portal_rfq/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/hotel-black.png differ diff --git a/website_portal_rfq/static/description/assets/icons/license.png b/website_portal_rfq/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/license.png differ diff --git a/website_portal_rfq/static/description/assets/icons/lifebuoy.png b/website_portal_rfq/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/lifebuoy.png differ diff --git a/website_portal_rfq/static/description/assets/icons/manufacturing-black.png b/website_portal_rfq/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_portal_rfq/static/description/assets/icons/pos-black.png b/website_portal_rfq/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/pos-black.png differ diff --git a/website_portal_rfq/static/description/assets/icons/puzzle.png b/website_portal_rfq/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/puzzle.png differ diff --git a/website_portal_rfq/static/description/assets/icons/restaurant-black.png b/website_portal_rfq/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/restaurant-black.png differ diff --git a/website_portal_rfq/static/description/assets/icons/service-black.png b/website_portal_rfq/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/service-black.png differ diff --git a/website_portal_rfq/static/description/assets/icons/trading-black.png b/website_portal_rfq/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/trading-black.png differ diff --git a/website_portal_rfq/static/description/assets/icons/training.png b/website_portal_rfq/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/training.png differ diff --git a/website_portal_rfq/static/description/assets/icons/update.png b/website_portal_rfq/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/update.png differ diff --git a/website_portal_rfq/static/description/assets/icons/user.png b/website_portal_rfq/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/user.png differ diff --git a/website_portal_rfq/static/description/assets/icons/wrench.png b/website_portal_rfq/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/website_portal_rfq/static/description/assets/icons/wrench.png differ diff --git a/website_portal_rfq/static/description/assets/misc/categories.png b/website_portal_rfq/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/categories.png differ diff --git a/website_portal_rfq/static/description/assets/misc/check-box.png b/website_portal_rfq/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/check-box.png differ diff --git a/website_portal_rfq/static/description/assets/misc/compass.png b/website_portal_rfq/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/compass.png differ diff --git a/website_portal_rfq/static/description/assets/misc/corporate.png b/website_portal_rfq/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/corporate.png differ diff --git a/website_portal_rfq/static/description/assets/misc/customer-support.png b/website_portal_rfq/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/customer-support.png differ diff --git a/website_portal_rfq/static/description/assets/misc/cybrosys-logo.png b/website_portal_rfq/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/cybrosys-logo.png differ diff --git a/website_portal_rfq/static/description/assets/misc/features.png b/website_portal_rfq/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/features.png differ diff --git a/website_portal_rfq/static/description/assets/misc/logo.png b/website_portal_rfq/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/logo.png differ diff --git a/website_portal_rfq/static/description/assets/misc/pictures.png b/website_portal_rfq/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/pictures.png differ diff --git a/website_portal_rfq/static/description/assets/misc/pie-chart.png b/website_portal_rfq/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/pie-chart.png differ diff --git a/website_portal_rfq/static/description/assets/misc/right-arrow.png b/website_portal_rfq/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/right-arrow.png differ diff --git a/website_portal_rfq/static/description/assets/misc/star.png b/website_portal_rfq/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/star.png differ diff --git a/website_portal_rfq/static/description/assets/misc/support.png b/website_portal_rfq/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/support.png differ diff --git a/website_portal_rfq/static/description/assets/misc/whatsapp.png b/website_portal_rfq/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/website_portal_rfq/static/description/assets/misc/whatsapp.png differ diff --git a/website_portal_rfq/static/description/assets/modules/1.png b/website_portal_rfq/static/description/assets/modules/1.png new file mode 100644 index 000000000..2c8fbb83f Binary files /dev/null and b/website_portal_rfq/static/description/assets/modules/1.png differ diff --git a/website_portal_rfq/static/description/assets/modules/2.png b/website_portal_rfq/static/description/assets/modules/2.png new file mode 100644 index 000000000..17ba4d75f Binary files /dev/null and b/website_portal_rfq/static/description/assets/modules/2.png differ diff --git a/website_portal_rfq/static/description/assets/modules/3.png b/website_portal_rfq/static/description/assets/modules/3.png new file mode 100644 index 000000000..a29119785 Binary files /dev/null and b/website_portal_rfq/static/description/assets/modules/3.png differ diff --git a/website_portal_rfq/static/description/assets/modules/4.png b/website_portal_rfq/static/description/assets/modules/4.png new file mode 100644 index 000000000..3add135c3 Binary files /dev/null and b/website_portal_rfq/static/description/assets/modules/4.png differ diff --git a/website_portal_rfq/static/description/assets/modules/5.png b/website_portal_rfq/static/description/assets/modules/5.png new file mode 100644 index 000000000..31ed46762 Binary files /dev/null and b/website_portal_rfq/static/description/assets/modules/5.png differ diff --git a/website_portal_rfq/static/description/assets/modules/6.gif b/website_portal_rfq/static/description/assets/modules/6.gif new file mode 100644 index 000000000..0b7368dc0 Binary files /dev/null and b/website_portal_rfq/static/description/assets/modules/6.gif differ diff --git a/website_portal_rfq/static/description/assets/screenshots/hero.gif b/website_portal_rfq/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..990ff2a9f Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/hero.gif differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq0.png b/website_portal_rfq/static/description/assets/screenshots/rfq0.png new file mode 100644 index 000000000..a9aaa870a Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq0.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq1.png b/website_portal_rfq/static/description/assets/screenshots/rfq1.png new file mode 100644 index 000000000..f3089659e Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq1.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq2.png b/website_portal_rfq/static/description/assets/screenshots/rfq2.png new file mode 100644 index 000000000..e27d6d85f Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq2.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq3.png b/website_portal_rfq/static/description/assets/screenshots/rfq3.png new file mode 100644 index 000000000..012b2f53d Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq3.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq4.png b/website_portal_rfq/static/description/assets/screenshots/rfq4.png new file mode 100644 index 000000000..14e1c6873 Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq4.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq5.png b/website_portal_rfq/static/description/assets/screenshots/rfq5.png new file mode 100644 index 000000000..78f8c2967 Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq5.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq6.png b/website_portal_rfq/static/description/assets/screenshots/rfq6.png new file mode 100644 index 000000000..a65e15967 Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq6.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq7.png b/website_portal_rfq/static/description/assets/screenshots/rfq7.png new file mode 100644 index 000000000..a83cd3358 Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq7.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq8.png b/website_portal_rfq/static/description/assets/screenshots/rfq8.png new file mode 100644 index 000000000..65f00338d Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq8.png differ diff --git a/website_portal_rfq/static/description/assets/screenshots/rfq9.png b/website_portal_rfq/static/description/assets/screenshots/rfq9.png new file mode 100644 index 000000000..7fe88067b Binary files /dev/null and b/website_portal_rfq/static/description/assets/screenshots/rfq9.png differ diff --git a/website_portal_rfq/static/description/banner.jpg b/website_portal_rfq/static/description/banner.jpg new file mode 100644 index 000000000..bcd5dd45b Binary files /dev/null and b/website_portal_rfq/static/description/banner.jpg differ diff --git a/website_portal_rfq/static/description/icon.png b/website_portal_rfq/static/description/icon.png new file mode 100644 index 000000000..dc18988aa Binary files /dev/null and b/website_portal_rfq/static/description/icon.png differ diff --git a/website_portal_rfq/static/description/index.html b/website_portal_rfq/static/description/index.html new file mode 100755 index 000000000..274ba17df --- /dev/null +++ b/website_portal_rfq/static/description/index.html @@ -0,0 +1,674 @@ +
+ +
+ +
+
+ Enterprise +
+
+ Community +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ RFQ From Portal

+

+ This module is helps to create RFQ from portal.

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module helps to request the quotation from customer portal. They can add single or multiple products, Also they can send some notes about the quotations. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + An option to send quotation request from customer portal. +
+
+ + Compatible with Odoo16 Community and Enterprise. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Go to My Account. +

+ +
+ +
+

+ Open Quotation Request from the Documents. +

+ + +
+ +
+

+ Click on the button to Add Product. +

+ +
+ +
+

+ Select Product and add Total Qty. +

+ +
+
+

+ If you click Add Product button again without adding the product in first line, it will show a Popup. +

+ + +
+
+

+ If you click on the Send Request button without adding the product, it will show a Popup. +

+ + +
+
+

+ Add products and then click Send Request button. +

+ + +
+
+

+ It will redirect to a success message page. +

+ + +
+
+

+ The created quotation from portal. +

+ +
+
+

+ Requested Quotation from the portal. +

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

+ 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

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/website_portal_rfq/static/src/css/website_rfq.css b/website_portal_rfq/static/src/css/website_rfq.css new file mode 100644 index 000000000..2dc12dc74 --- /dev/null +++ b/website_portal_rfq/static/src/css/website_rfq.css @@ -0,0 +1,7 @@ +.image_11 { + width: 100px; + height: 100px; + object-fit: contain; + /* Add more CSS styles here */ +} + diff --git a/website_portal_rfq/static/src/img/cam1.png b/website_portal_rfq/static/src/img/cam1.png new file mode 100644 index 000000000..7252b02e1 Binary files /dev/null and b/website_portal_rfq/static/src/img/cam1.png differ diff --git a/website_portal_rfq/static/src/js/customer_portal.js b/website_portal_rfq/static/src/js/customer_portal.js new file mode 100755 index 000000000..bbddcdb6a --- /dev/null +++ b/website_portal_rfq/static/src/js/customer_portal.js @@ -0,0 +1,125 @@ +odoo.define('website_portal_rfq.customer_portal', function (require) { + var ajax = require('web.ajax'); + var publicWidget = require('web.public.widget'); + + publicWidget.registry.AdvancedPortalImport = publicWidget.Widget.extend({ + selector: '.o_portal_wrap', + events: { + 'click #add_image': '_onClickAddProduct', + 'click .delete_row': '_onClickDeleteRow', + 'click .send_rfq_request1': '_onClickSubmit', + 'change .add_product_images': '_onChangeProduct', + 'change .quantity': '_onChangeQuantity', + }, + +// This will help add products from the portal to create a new order + _onClickAddProduct: async function (e) { + var rowCount = this.$("#image_table tr").length; + if (rowCount === 0) { + this.$("#image_table").append('Add Products'); + return; + } + var allRowsHaveProducts = true; // Flag to track if all rows have products + // Loop through each row in the table + this.$("#image_table tr.products").each(function () { + var productSelect = $(this).find("select.add_product_images"); + if (productSelect.val() === "") { + allRowsHaveProducts = false; + return false; + } + }); + if (!allRowsHaveProducts) { + alert("Please select a product for all rows."); + return; + } + rowCount++; + var rowId = "row_" + rowCount; + var imageId = "image_" + rowCount; + var productId = "product_" + rowCount; + var uomId = "uom_" + rowCount; + var quantityId = "quantity_" + rowCount; + var descriptionId = "description_" + rowCount; + table_data=' ' + table_data+='' + table_data+=''; + this.$("#image_table").append(table_data); + }, + + // Delete the row if not needed + _onClickDeleteRow: function (e) { + var row = this.$(e.currentTarget).parent().parent()[0].id; + this.$('#' + row).remove(); + }, + + // Submit the request from the portal + _onClickSubmit: function (e) { + e.preventDefault(); + var productCount = this.$("#image_table tr.products").length; + if (productCount === 0) { + alert("Please add at least one product before submitting the form."); + return; + } + // Loop through each row in the table + var allRowsHaveProducts = true; + this.$("#image_table tr.products").each(function () { + var productSelect = $(this).find("select.add_product_images"); + if (productSelect.val() === "") { + allRowsHaveProducts = false; + return false; + } + }); + if (!allRowsHaveProducts) { + alert("Please select a product for all rows."); + return; + } + var form = this.$("#my_send_request"); + form.submit(); + }, +// Check if the input is a valid number + _onChangeQuantity:function (e) { + var inputValue = e.target.value; + var isNumeric = /^[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?$/.test(inputValue); + if (!isNumeric) { + alert("Please enter a valid numeric value for quantity."); + // Set it back to the default value + e.target.value = "1"; + } + }, + + // Add image of the product when changing it + _onChangeProduct: function (e) { + const row = this.$(e.currentTarget).closest('tr'); + const uomSelect = row.find('select.add_uom'); + // Update the image + const img = row.find('img')[0]; + ajax.jsonRpc('/my/product_image', 'call', { + 'onchange_product_id': e.currentTarget.value, + }).then(function (data) { + img.src = data ? 'data:image/jpeg;base64,' + data : '/website_portal_rfq/static/src/img/cam1.png'; + }); + // Fetch and update the UOM options based on the selected product + const productId = e.currentTarget.value; + if (productId) { + ajax.jsonRpc('/my/product_uom', 'call', { + 'product_id': productId, + }).then(function (data) { + // Update the UOM select options + uomSelect.empty(); + for (let i = 0; i < data.uom_ids.length; i++) { + uomSelect.append(''); + } + }); + } else { + // Clear UOM options if no product is selected + uomSelect.empty(); + uomSelect.append(''); + } + }, + }); +}); diff --git a/website_portal_rfq/views/portal_rfq_templates.xml b/website_portal_rfq/views/portal_rfq_templates.xml new file mode 100755 index 000000000..73e9a07a9 --- /dev/null +++ b/website_portal_rfq/views/portal_rfq_templates.xml @@ -0,0 +1,175 @@ + + + + + + + +