diff --git a/website_estimated_delivery_time/README.rst b/website_estimated_delivery_time/README.rst new file mode 100644 index 000000000..71a850979 --- /dev/null +++ b/website_estimated_delivery_time/README.rst @@ -0,0 +1,47 @@ +.. 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 + +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 +------- +Affero General Public License, Version 3 (AGPL-3). +(https://www.gnu.org/licenses/agpl-3.0.en.html) + +Credits +------- +* Developer: V(17): Ammu Raj, 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..b602ec70d --- /dev/null +++ b/website_estimated_delivery_time/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 +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..5be3bd0af --- /dev/null +++ b/website_estimated_delivery_time/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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': 'Estimated Delivery Time On Website', + 'version': '17.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': 'AGPL-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..5e0b2789b --- /dev/null +++ b/website_estimated_delivery_time/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 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..05cf83935 --- /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) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 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..b4a8e954c --- /dev/null +++ b/website_estimated_delivery_time/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 02.04.2024 +#### Version 17.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..26ad448dc --- /dev/null +++ b/website_estimated_delivery_time/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 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..84738a00a --- /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) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 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..0183b670d --- /dev/null +++ b/website_estimated_delivery_time/models/product_template.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 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..87569760f --- /dev/null +++ b/website_estimated_delivery_time/security/website_estimated_delivery_time_groups.xml @@ -0,0 +1,28 @@ + + + + + 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/capture (1).png b/website_estimated_delivery_time/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/capture (1).png differ 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/img.png b/website_estimated_delivery_time/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/img.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/photo-capture.png b/website_estimated_delivery_time/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/website_estimated_delivery_time/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/misc/Cybrosys R.png differ diff --git a/website_estimated_delivery_time/static/description/assets/misc/email.svg b/website_estimated_delivery_time/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/website_estimated_delivery_time/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website_estimated_delivery_time/static/description/assets/misc/phone.svg b/website_estimated_delivery_time/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/website_estimated_delivery_time/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/website_estimated_delivery_time/static/description/assets/misc/star (1) 2.svg b/website_estimated_delivery_time/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/website_estimated_delivery_time/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/website_estimated_delivery_time/static/description/assets/misc/support (1) 1.svg b/website_estimated_delivery_time/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/website_estimated_delivery_time/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/website_estimated_delivery_time/static/description/assets/misc/support-email.svg b/website_estimated_delivery_time/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/website_estimated_delivery_time/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/website_estimated_delivery_time/static/description/assets/misc/tick-mark.svg b/website_estimated_delivery_time/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/website_estimated_delivery_time/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/website_estimated_delivery_time/static/description/assets/misc/whatsapp 1.svg b/website_estimated_delivery_time/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/website_estimated_delivery_time/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/website_estimated_delivery_time/static/description/assets/misc/whatsapp.svg b/website_estimated_delivery_time/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/website_estimated_delivery_time/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..d1d3775d6 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..dcbd0cb06 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..2a27948da 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..05ed3ee8c 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 100755 index 000000000..db6fc1ced 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..f52018e60 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/1.png b/website_estimated_delivery_time/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..79cfa2b98 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/1.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..92c76f094 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..7eb1f3278 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..6db862419 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/13.png b/website_estimated_delivery_time/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..26790cff1 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/13.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..1096e8a43 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..975401928 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..69c773971 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..9db19110b 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/2.png b/website_estimated_delivery_time/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..6355e3e3c Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/2.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/3.png b/website_estimated_delivery_time/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..1aab8e5d2 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/3.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/4.png b/website_estimated_delivery_time/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..4144f7e19 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/4.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/5.png b/website_estimated_delivery_time/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..7c6bf951e Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/5.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/6.png b/website_estimated_delivery_time/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..f20da439d Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/6.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/7.png b/website_estimated_delivery_time/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..193cb206d Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/7.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/8.png b/website_estimated_delivery_time/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..8b8e22dbb Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/8.png differ diff --git a/website_estimated_delivery_time/static/description/assets/screenshots/9.png b/website_estimated_delivery_time/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..0af060fe9 Binary files /dev/null and b/website_estimated_delivery_time/static/description/assets/screenshots/9.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..91d760d10 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..6baf80149 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..dda4e8060 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..6be72f937 --- /dev/null +++ b/website_estimated_delivery_time/static/description/index.html @@ -0,0 +1,942 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+
+

+ Estimated Delivery Time On Website

+

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

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ 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.

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

+ Admin Can Change The Backend Settings. +

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

+ Menu For Wizard Configuration. +

+
+
+
+
+
+
+ +
+
+

+ 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. +

+
+
+
+
+
+
+ +
+
+

+ 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. +

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

+ Then You will get a message. +

+
+
+
+
+
+
+
    +
  • + Customers can know the Estimated Delivery Time. +
  • +
  • + Admin can set Estimated Delivery Time based on PIN code for all products. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:1st April 2024 +
+

+ Initial Commit for Estimated Delivery Time On Website

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + 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..96ef5758f --- /dev/null +++ b/website_estimated_delivery_time/static/src/js/website_estimated_delivery_time.js @@ -0,0 +1,37 @@ +/** @odoo-module **/ + +import publicWidget from "@web/legacy/js/public/public_widget"; +import { registry } from "@web/core/registry"; +import { jsonrpc } from "@web/core/network/rpc_service"; + /** + * 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(); + jsonrpc('/website_estimated_delivery_time', { + '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..b8ad9f184 --- /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..4eb9af8df --- /dev/null +++ b/website_estimated_delivery_time/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 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..e4abc72d1 --- /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) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 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..113a5c227 --- /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) 2024-TODAY Cybrosys Technologies() +# Author: Ammu Raj (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 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..e0cce6b38 --- /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 + + + +