diff --git a/website_estimated_delivery_time/README.rst b/website_estimated_delivery_time/README.rst new file mode 100644 index 000000000..a62825263 --- /dev/null +++ b/website_estimated_delivery_time/README.rst @@ -0,0 +1,47 @@ +.. 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 + +Estimated Delivery Time On Website +================================== +This module allows your customers to know the delivery time.It also facilitates +the admin to exercise different rights like defining the number of days in which +the product will be delivered and the product availability with PIN codes. + +Configuration +============= +* No additional configuration needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developer: V(16): Albin PJ, 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_estimated_delivery_time/__init__.py b/website_estimated_delivery_time/__init__.py new file mode 100644 index 000000000..68b5af9a7 --- /dev/null +++ b/website_estimated_delivery_time/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import controllers +from . import models +from . import wizard diff --git a/website_estimated_delivery_time/__manifest__.py b/website_estimated_delivery_time/__manifest__.py new file mode 100644 index 000000000..75ca58ad9 --- /dev/null +++ b/website_estimated_delivery_time/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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': 'Estimated Delivery Time On Website', + 'version': '16.0.1.0.0', + 'category': 'Website', + 'summary': """This module allows you to see the delivery time on the website + product page""", + 'description': """This module allows the users to know the delivery + time. It also facilitates the admin to exercise different rights like + defining the number of days in which the product will be delivered and the + product availability with PIN codes.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['website_sale'], + 'data': [ + 'security/website_estimated_delivery_time_groups.xml', + 'security/ir.model.access.csv', + 'views/product_template_views.xml', + 'views/website_templates.xml', + 'wizard/website_estimated_delivery_time_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'website_estimated_delivery_time/static/src/js/website_estimated_delivery_time.js', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/website_estimated_delivery_time/controllers/__init__.py b/website_estimated_delivery_time/controllers/__init__.py new file mode 100644 index 000000000..f7f2cacae --- /dev/null +++ b/website_estimated_delivery_time/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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 website_estimated_delivery_time diff --git a/website_estimated_delivery_time/controllers/website_estimated_delivery_time.py b/website_estimated_delivery_time/controllers/website_estimated_delivery_time.py new file mode 100644 index 000000000..4ea649bce --- /dev/null +++ b/website_estimated_delivery_time/controllers/website_estimated_delivery_time.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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 WebsiteEstimatedDeliveryTime(http.Controller): + """Returns the estimated delivery time""" + + @http.route(['/website_estimated_delivery_time'], type='json', + auth="public", website=True, csrf=False) + def website_estimated_delivery_time(self, **kwargs): + """Returns the estimated delivery time and messages""" + data = {'product_base_availability': 'False', + 'website_base_availability': 'False', + 'available_message': '', 'unavailable_message': ''} + days = [] + product_id = request.env['product.template'].browse( + int(kwargs.get('product_id'))) + message = request.env['website.estimated.delivery.time'].search([]) + if product_id.overwrite_existing_config: + for rec in product_id.product_estimated_delivery_time_ids: + if rec.pin == kwargs.get('pin_number'): + days.append(rec.days) + data['product_base_availability'] = 'True' + if days: + data['available_message'] = ' '.join( + [str(message.available_message), str(days[0]), + 'Days']) + else: + website_wizard = request.env[ + 'website.estimated.delivery.time'].search([]) + for rec in website_wizard.estimated_delivery_time_ids: + if rec.pin == kwargs.get('pin_number'): + days.append(rec.days) + data['website_base_availability'] = 'True' + if days: + if message.display_mode == 'exact': + data['available_message'] = ' '.join( + [str(message.available_message), str(days[0]), 'Days']) + else: + if message.delivery_day_range == 'days_after': + data['available_message'] = ' '.join( + [str(message.available_message), str(days[0]), '-', + str(days[0] + message.number_of_days), 'Days']) + else: + if days[0] - message.number_of_days < 0: + days_before = 0 + else: + days_before = days[0] - message.number_of_days + data['available_message'] = ' '.join( + [str(message.available_message), + str(days_before), '-', + str(days[0]), 'Days']) + data['unavailable_message'] = message.unavailable_message + return data diff --git a/website_estimated_delivery_time/doc/RELEASE_NOTES.md b/website_estimated_delivery_time/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..ac395f693 --- /dev/null +++ b/website_estimated_delivery_time/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 30.12.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Estimated Delivery Time On Website diff --git a/website_estimated_delivery_time/models/__init__.py b/website_estimated_delivery_time/models/__init__.py new file mode 100644 index 000000000..88ce39114 --- /dev/null +++ b/website_estimated_delivery_time/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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 product_estimated_delivery_time +from . import product_template diff --git a/website_estimated_delivery_time/models/product_estimated_delivery_time.py b/website_estimated_delivery_time/models/product_estimated_delivery_time.py new file mode 100644 index 000000000..2e4989255 --- /dev/null +++ b/website_estimated_delivery_time/models/product_estimated_delivery_time.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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 ProductEstimatedDeliveryTime(models.Model): + """This is for adding the estimated delivery time for each product""" + _name = 'product.estimated.delivery.time' + _description = "Product Estimated Delivery Time" + + name = fields.Char(string="Name", required=True, + help="Estimated delivery time name") + pin = fields.Char(string="PIN", required=True, help="PIN number") + days = fields.Integer(string="Available Within (Days)", required=True, + help="Estimated delivery time in days") + product_id = fields.Many2one('product.template', + string="Product", help="Relational field") diff --git a/website_estimated_delivery_time/models/product_template.py b/website_estimated_delivery_time/models/product_template.py new file mode 100644 index 000000000..16d62c8aa --- /dev/null +++ b/website_estimated_delivery_time/models/product_template.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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 ProductTemplate(models.Model): + """This is for adding notebook on product.template model""" + _inherit = 'product.template' + + overwrite_existing_config = fields.Boolean( + string="Overwrite Existing Configuration", + help="Overwrite the existing configuration in the wizard") + delivery_time_visibility = fields.Boolean(string="Delivery Time Visibility", + help="Delivery time visibility " + "based on this field") + product_estimated_delivery_time_ids = fields.One2many( + 'product.estimated.delivery.time', 'product_id', + string="Product Estimated Delivery Time", + help="One2many for adding estimated delivery time in product") diff --git a/website_estimated_delivery_time/security/ir.model.access.csv b/website_estimated_delivery_time/security/ir.model.access.csv new file mode 100644 index 000000000..2d598060c --- /dev/null +++ b/website_estimated_delivery_time/security/ir.model.access.csv @@ -0,0 +1,7 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_estimated_delivery_time_administrator,access.product.estimated.delivery.time.administrator,model_product_estimated_delivery_time,website_estimated_delivery_time.website_estimated_delivery_time_group_administrator,1,1,1,1 +access_product_estimated_delivery_time_user,access.product.estimated.delivery.time.user,model_product_estimated_delivery_time,website_estimated_delivery_time.website_estimated_delivery_time_group_user,1,1,1,1 +access_estimated_delivery_time_administrator,access.estimated.delivery.time.administrator,model_estimated_delivery_time,website_estimated_delivery_time.website_estimated_delivery_time_group_administrator,1,1,1,1 +access_estimated_delivery_time_user,access.estimated.delivery.time.user,model_estimated_delivery_time,website_estimated_delivery_time.website_estimated_delivery_time_group_user,1,1,1,1 +access_website_estimated_delivery_time_administrator,access.website.estimated.delivery.time.administrator,model_website_estimated_delivery_time,website_estimated_delivery_time.website_estimated_delivery_time_group_administrator,1,1,1,1 +access_website_estimated_delivery_time_user,access.website.estimated.delivery.time.user,model_website_estimated_delivery_time,website_estimated_delivery_time.website_estimated_delivery_time_group_user,1,1,1,1 diff --git a/website_estimated_delivery_time/security/website_estimated_delivery_time_groups.xml b/website_estimated_delivery_time/security/website_estimated_delivery_time_groups.xml new file mode 100644 index 000000000..09dc5e456 --- /dev/null +++ b/website_estimated_delivery_time/security/website_estimated_delivery_time_groups.xml @@ -0,0 +1,21 @@ + + + + + Website Estimated Delivery Time + Access For Estimated Delivery Time On Website Module + 11 + + + User + + + + Administrator + + + + + + + diff --git a/website_estimated_delivery_time/static/description/assets/icons/check.png b/website_estimated_delivery_time/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/check.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/chevron.png b/website_estimated_delivery_time/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/chevron.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/cogs.png b/website_estimated_delivery_time/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/cogs.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/consultation.png b/website_estimated_delivery_time/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/consultation.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/ecom-black.png b/website_estimated_delivery_time/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/ecom-black.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/education-black.png b/website_estimated_delivery_time/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/education-black.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/hotel-black.png b/website_estimated_delivery_time/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/hotel-black.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/license.png b/website_estimated_delivery_time/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/license.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/lifebuoy.png b/website_estimated_delivery_time/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/lifebuoy.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/manufacturing-black.png b/website_estimated_delivery_time/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/pos-black.png b/website_estimated_delivery_time/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/pos-black.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/puzzle.png b/website_estimated_delivery_time/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/puzzle.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/restaurant-black.png b/website_estimated_delivery_time/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/restaurant-black.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/service-black.png b/website_estimated_delivery_time/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/service-black.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/trading-black.png b/website_estimated_delivery_time/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/trading-black.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/training.png b/website_estimated_delivery_time/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/training.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/update.png b/website_estimated_delivery_time/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/update.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/user.png b/website_estimated_delivery_time/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/user.png differ diff --git a/website_estimated_delivery_time/static/description/assets/icons/wrench.png b/website_estimated_delivery_time/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/wrench.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/categories.png b/website_estimated_delivery_time/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/categories.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/check-box.png b/website_estimated_delivery_time/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/check-box.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/compass.png b/website_estimated_delivery_time/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/compass.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/corporate.png b/website_estimated_delivery_time/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/corporate.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/customer-support.png b/website_estimated_delivery_time/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/customer-support.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/cybrosys-logo.png b/website_estimated_delivery_time/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/cybrosys-logo.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/features.png b/website_estimated_delivery_time/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/features.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/logo.png b/website_estimated_delivery_time/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/logo.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/pictures.png b/website_estimated_delivery_time/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/pictures.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/pie-chart.png b/website_estimated_delivery_time/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/pie-chart.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/right-arrow.png b/website_estimated_delivery_time/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/right-arrow.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/star.png b/website_estimated_delivery_time/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/star.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/support.png b/website_estimated_delivery_time/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/support.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/whatsapp.png b/website_estimated_delivery_time/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/whatsapp.png differ diff --git a/website_estimated_delivery_time/static/description/assets/modules/1.png b/website_estimated_delivery_time/static/description/assets/modules/1.png new file mode 100644 index 000000000..df65629bf Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/modules/1.png differ diff --git a/website_estimated_delivery_time/static/description/assets/modules/2.png b/website_estimated_delivery_time/static/description/assets/modules/2.png new file mode 100644 index 000000000..6058f6c3b Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/modules/2.png differ diff --git a/website_estimated_delivery_time/static/description/assets/modules/3.png b/website_estimated_delivery_time/static/description/assets/modules/3.png new file mode 100644 index 000000000..163485cfd Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/modules/3.png differ diff --git a/website_estimated_delivery_time/static/description/assets/modules/4.png b/website_estimated_delivery_time/static/description/assets/modules/4.png new file mode 100644 index 000000000..618e3e6c4 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/modules/4.png differ diff --git a/website_estimated_delivery_time/static/description/assets/modules/5.png b/website_estimated_delivery_time/static/description/assets/modules/5.png new file mode 100644 index 000000000..2a722d66e Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/modules/5.png differ diff --git a/website_estimated_delivery_time/static/description/assets/modules/6.png b/website_estimated_delivery_time/static/description/assets/modules/6.png new file mode 100644 index 000000000..a44d454aa Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/modules/6.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/10.png b/website_estimated_delivery_time/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..ebaad88f0 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/10.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/11.png b/website_estimated_delivery_time/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..8a9a22c7f Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/11.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/12.png b/website_estimated_delivery_time/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..cd392a2bc Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/12.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/14.png b/website_estimated_delivery_time/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..483ddd0f0 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/14.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/15.png b/website_estimated_delivery_time/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..2e21b1346 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/15.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/16.png b/website_estimated_delivery_time/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..d29818cd5 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/16.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/17.png b/website_estimated_delivery_time/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..d3e7c153c Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/17.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/18.png b/website_estimated_delivery_time/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..df84a9685 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/18.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/19.png b/website_estimated_delivery_time/static/description/assets/screenshots/19.png new file mode 100644 index 000000000..998a4a8f3 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/19.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/22.png b/website_estimated_delivery_time/static/description/assets/screenshots/22.png new file mode 100644 index 000000000..46540aa39 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/22.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/33.png b/website_estimated_delivery_time/static/description/assets/screenshots/33.png new file mode 100644 index 000000000..d2ff0e711 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/33.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/44.png b/website_estimated_delivery_time/static/description/assets/screenshots/44.png new file mode 100644 index 000000000..ef1de78c0 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/44.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/55.png b/website_estimated_delivery_time/static/description/assets/screenshots/55.png new file mode 100644 index 000000000..df84a9685 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/55.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/66.png b/website_estimated_delivery_time/static/description/assets/screenshots/66.png new file mode 100644 index 000000000..3ed36fe4b Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/66.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/77.png b/website_estimated_delivery_time/static/description/assets/screenshots/77.png new file mode 100644 index 000000000..330900929 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/77.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/88.png b/website_estimated_delivery_time/static/description/assets/screenshots/88.png new file mode 100644 index 000000000..a5e39ad54 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/88.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/99.png b/website_estimated_delivery_time/static/description/assets/screenshots/99.png new file mode 100644 index 000000000..eb45c9574 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/99.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/hero.gif b/website_estimated_delivery_time/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..86fc54cbe Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/hero.gif differ diff --git a/website_estimated_delivery_time/static/description/banner.png b/website_estimated_delivery_time/static/description/banner.png new file mode 100644 index 000000000..51846533d Binary files /dev/null and b/website_estimated_delivery_time/static/description/banner.png differ diff --git a/website_estimated_delivery_time/static/description/icon.png b/website_estimated_delivery_time/static/description/icon.png new file mode 100644 index 000000000..5ace50bb9 Binary files /dev/null and b/website_estimated_delivery_time/static/description/icon.png differ diff --git a/website_estimated_delivery_time/static/description/index.html b/website_estimated_delivery_time/static/description/index.html new file mode 100644 index 000000000..64bd7083c --- /dev/null +++ b/website_estimated_delivery_time/static/description/index.html @@ -0,0 +1,736 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+ +
+
+ +
+
+
+ +

+ Estimated Delivery Time On Website

+

+ This Module Allows you to See the Delivery Time (Days) on + the Website Product Page +

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module allows the users to know the delivery time. It also + facilitates the admin to exercise different rights like defining the + number of days in which the product will be delivered and the product + availability with PIN codes. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Customers can know the Estimated Delivery Time (Days) on their PIN Locations. +
+
+ + Admin will be able to set the Estimated Delivery Time backend based on PIN Code. +
+
+ + Admin can set Estimated Delivery Time based on each product. +
+
+
+ + Also, Admin can set Estimated Delivery Time based on PIN code for all products. +
+
+ + + +
+
+ +
+

+ Screenshots +

+ +
+
+
+ +
+

+ Admin Can Change The Backend Settings +

+ +
+ +
+

+ User Can Check The Estimated Delivery Time Through the + Website

+ +
+ + +
+

+ Menu For Wizard Configuration +

+ +
+ + +
+

+ Wizard Configuration For All Products +

+

+ The PIN code and Estimated Delivery Time added in this wizard + are for all products. All products will be available in the + Estimated Delivery Time mentioned in the PIN codes added in the + wizard. But if the PIN code is set by the admin in the product + view, that product will not be associated with the PIN code in + the wizard.

+ +
+
+

+ If you go to the product page and Search by using PIN codes + added in the wizard, you can see the Estimated Delivery Time of + the product.

+ +
+
+

+ Then user can see the Estimated Delivery Time.

+ +
+
+

+ If you are search using PIN codes that are not added in the + wizard then you will get a message.

+ +
+
+

+ Also, we can set the display mode in Range and the Delivery Day + Range as after.

+ +
+
+

+ Based on the given rules the Estimated Delivery Time is shown + below.

+ +
+
+

+ Also, we can set the Delivery Day Range as before.

+ +
+
+

+ Based on the given rules the Estimated Delivery Time is shown + below.

+ +
+
+

+ Estimated Delivery Time For Each Product

+

+ Admin can set the Estimated Delivery Time based on the PIN code + for each product. For that enable this boolean.

+ +
+
+

+ Add the PIN codes and Estimated Delivery Time.

+ +
+
+

+ Search Estimated Delivery Time by PIN code in product + page.

+ +
+
+

+ Then user can see the Estimated Delivery Time for that + product.

+ +
+
+

+ If you are searching for PIN codes that are not added in the + product configuration.

+ +
+
+

+ Then You will get a message.

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

+ 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_estimated_delivery_time/static/src/js/website_estimated_delivery_time.js b/website_estimated_delivery_time/static/src/js/website_estimated_delivery_time.js new file mode 100644 index 000000000..a749d0fcb --- /dev/null +++ b/website_estimated_delivery_time/static/src/js/website_estimated_delivery_time.js @@ -0,0 +1,40 @@ +odoo.define("website_estimated_delivery_time.estimated_delivery_time", function(require) { + "use strict"; + // Importing required modules + var publicWidget = require('web.public.widget'); + var registry = require("@web/core/registry") + var ajax = require('web.ajax'); + var core = require('web.core'); + /** + * Widget for handling the estimated delivery time functionality. + */ + var Template = publicWidget.Widget.extend({ + selector: '#search_website_pin_number', + events: { + 'click #search_button': '_onClickSearchButton' + }, + /** + * Handler for the search button click event. + * Retrieves and processes the pin number and product ID. + */ + _onClickSearchButton: function() { + let self = this + var search_value = self.$el.find("#pin_number").val(); + var product_id = self.$el.find("#product_id").val(); + ajax.jsonRpc('/website_estimated_delivery_time', 'call', { + 'pin_number': search_value, + 'product_id': product_id + }).then(function(result) { + if (result.product_base_availability == 'True' || result.website_base_availability == 'True') { + self.$el.find('#AvailableModal').modal('show'); + self.$el.find('#AvailableModal').find('#message_to_show_available').text(result.available_message) + } else { + self.$el.find('#NotAvailableModal').modal('show'); + self.$el.find('#NotAvailableModal').find('#message_to_show_unavailable').text(result.unavailable_message) + } + }); + } + }) + publicWidget.registry.search_pin_number = Template; + return Template +}) diff --git a/website_estimated_delivery_time/views/product_template_views.xml b/website_estimated_delivery_time/views/product_template_views.xml new file mode 100644 index 000000000..d0409adbc --- /dev/null +++ b/website_estimated_delivery_time/views/product_template_views.xml @@ -0,0 +1,31 @@ + + + + + + product.template.view.form.inherit.website.estimated.delivery.time + + product.template + + + + + + + + + + + + + + + + + + + diff --git a/website_estimated_delivery_time/views/website_templates.xml b/website_estimated_delivery_time/views/website_templates.xml new file mode 100644 index 000000000..669d29627 --- /dev/null +++ b/website_estimated_delivery_time/views/website_templates.xml @@ -0,0 +1,79 @@ + + + + + + + diff --git a/website_estimated_delivery_time/wizard/__init__.py b/website_estimated_delivery_time/wizard/__init__.py new file mode 100644 index 000000000..bd66a24a4 --- /dev/null +++ b/website_estimated_delivery_time/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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 estimated_delivery_time +from . import website_estimated_delivery_time diff --git a/website_estimated_delivery_time/wizard/estimated_delivery_time.py b/website_estimated_delivery_time/wizard/estimated_delivery_time.py new file mode 100644 index 000000000..268645c24 --- /dev/null +++ b/website_estimated_delivery_time/wizard/estimated_delivery_time.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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 EstimatedDeliveryTime(models.Model): + """This is for adding the estimated delivery time for all product""" + _name = 'estimated.delivery.time' + _description = "Estimated Delivery Time" + + name = fields.Char(string="Name", required=True, + help="Estimated delivery time name") + pin = fields.Char(string="PIN", required=True, help="PIN number") + days = fields.Integer(string="Available Within (Days)", required=True, + help="Estimated delivery time in days") + website_estimated_delivery_time_id = fields.Many2one( + 'website.estimated.delivery.time', + string="Relational Fields", + help="Relational field") diff --git a/website_estimated_delivery_time/wizard/website_estimated_delivery_time.py b/website_estimated_delivery_time/wizard/website_estimated_delivery_time.py new file mode 100644 index 000000000..11d546724 --- /dev/null +++ b/website_estimated_delivery_time/wizard/website_estimated_delivery_time.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Albin P J (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 WebsiteEstimatedDeliveryTime(models.Model): + """This is for adding the estimated delivery time for all product""" + _name = 'website.estimated.delivery.time' + _description = "Estimated Delivery Time" + + available_message = fields.Char( + string="Message To Display When The Product Is Available", + help="Message to display when the product is available", required=True, + default="This Product Will Be Delivered Within") + unavailable_message = fields.Char( + string="Message To Display When The Product Is Unavailable", + help="Message to display when the product is unavailable", + required=True, default="This Product Is Not Available In Your Location") + display_mode = fields.Selection([('exact', 'Exact'), + ('range', 'Range')], + string='Display Mode', default='exact', + required=True) + delivery_day_range = fields.Selection([ + ('days_before', 'Add Days Before'), + ('days_after', 'Add Days After')], + string='Delivery Day Range', + default='days_after', required=True, + help="Day range to deliver products") + number_of_days = fields.Integer(string="Number Of Days", + help="The number of days added or " + "subtracted the actual days in order" + "to create delivery range", + required=True) + estimated_delivery_time_ids = fields.One2many( + 'estimated.delivery.time', + 'website_estimated_delivery_time_id', + required=True, + string="Estimated Delivery Time", + help="Add Estimated delivery Time") + + def action_website_estimated_delivery_time(self): + """This is for deleting the previous records in the + website.estimated.delivery.time and estimated.delivery.time""" + for rec in self.env['website.estimated.delivery.time'].search( + [('id', '!=', self.id)]): + rec.unlink() + for records in self.env['estimated.delivery.time'].search( + [('id', '!=', self.estimated_delivery_time_ids.ids)]): + records.unlink() diff --git a/website_estimated_delivery_time/wizard/website_estimated_delivery_time_views.xml b/website_estimated_delivery_time/wizard/website_estimated_delivery_time_views.xml new file mode 100644 index 000000000..d20ee60e6 --- /dev/null +++ b/website_estimated_delivery_time/wizard/website_estimated_delivery_time_views.xml @@ -0,0 +1,77 @@ + + + + + website.estimated.delivery.time.view.form + website.estimated.delivery.time + +
+ + + + + + + + + + + + + + + + + + + +

For Example:- If the Actual + Delivery Days = 9 days and the days before = 3days + then the delivery range = 6 to 9 days.And if the + Actual Delivery Days = 9 days and the days after = 3 days + then the delivery range = 9 to 12 days +

+ + + + + + + + + + + +
+
+ +
+
+ + + Estimated Delivery Time + ir.actions.act_window + website.estimated.delivery.time + form + + new + + + +