diff --git a/restrict_delivery_method/README.rst b/restrict_delivery_method/README.rst new file mode 100644 index 000000000..99e71d9c7 --- /dev/null +++ b/restrict_delivery_method/README.rst @@ -0,0 +1,55 @@ +.. 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 + +Restrict Delivery Method +======================== + +Restrict Certain shipping methods for certain products. + +Installation +============ +- www.odoo.com/documentation/17.0/administration/install.html +- Install our custom addon + +Configuration +------------- +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer : (V16) Shafna K, + (V17) Sabeel B, +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/restrict_delivery_method/__init__.py b/restrict_delivery_method/__init__.py new file mode 100644 index 000000000..9edcb9c0a --- /dev/null +++ b/restrict_delivery_method/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (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 wizards diff --git a/restrict_delivery_method/__manifest__.py b/restrict_delivery_method/__manifest__.py new file mode 100644 index 000000000..9f475e26c --- /dev/null +++ b/restrict_delivery_method/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (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': "Restrict Delivery Method", + 'version': '17.0.1.0.0', + 'category': 'Sales', 'Website' + 'summary': 'To restrict delivery methods in both sales and website.', + 'description': """This module helps to restrict delivery methods for + certain products that set inside the shipping methods.""", + 'author': " Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale_management', 'delivery', 'website_sale'], + 'data': [ + 'views/delivery_carrier_views.xml', + 'views/sale_order_views.xml', + 'wizards/choose_delivery_method_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/restrict_delivery_method/controllers/__init__.py b/restrict_delivery_method/controllers/__init__.py new file mode 100644 index 000000000..c27d99d25 --- /dev/null +++ b/restrict_delivery_method/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (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 restrict_delivery_method diff --git a/restrict_delivery_method/controllers/restrict_delivery_method.py b/restrict_delivery_method/controllers/restrict_delivery_method.py new file mode 100644 index 000000000..c4507bd3c --- /dev/null +++ b/restrict_delivery_method/controllers/restrict_delivery_method.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (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 _ +from odoo.addons.website_sale.controllers.delivery import WebsiteSaleDelivery + + +class RestrictWebsiteDeliveryMethod(WebsiteSaleDelivery): + """This class is the inherited class and uses the function in that + class and super that function""" + def _get_shop_payment_values(self, order, **kwargs): + """Using this function we call another function + to restrict delivery method""" + res = super()._get_shop_payment_values(order, **kwargs) + if not order._get_restrict_delivery_method(): + res['errors'].append( + (_('Sorry, we are unable to ship your order'), + _('No shipping method is available for the product(s) you ' + 'have chosen.' + 'Please contact us for more information.'))) + delivery_carriers = order._get_restrict_delivery_method() + res['deliveries'] = delivery_carriers.sudo() + return res diff --git a/restrict_delivery_method/doc/RELEASE_NOTES.md b/restrict_delivery_method/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..c6fd0e23b --- /dev/null +++ b/restrict_delivery_method/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 31.01.2024 +#### Version 17.0.1.0.0 +#### ADD + - Initial Commit for Restrict Delivery Method diff --git a/restrict_delivery_method/models/__init__.py b/restrict_delivery_method/models/__init__.py new file mode 100644 index 000000000..072ec54f0 --- /dev/null +++ b/restrict_delivery_method/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (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 delivery_carrier +from . import sale_order diff --git a/restrict_delivery_method/models/delivery_carrier.py b/restrict_delivery_method/models/delivery_carrier.py new file mode 100644 index 000000000..32853a6cc --- /dev/null +++ b/restrict_delivery_method/models/delivery_carrier.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, fields, models, _ + + +class DeliveryCarrier(models.Model): + """This contains the fields added in shipping methods in odoo""" + _inherit = "delivery.carrier" + + restrict_product_ids = fields.Many2many('product.template', + string="Restrict Product", + help="Choose the products" + " to restrict from this " + "delivery method") + partner_warning = fields.Boolean(string="Warning", + help="Enable if partner " + "warning needed") + + def action_notification(self): + """Function to show the sticky notification""" + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'title': 'Warning', + 'message': _("Default delivery method given for a partner" + " cannot be restricted!"), + 'type': 'warning', + 'sticky': False, + } + } + + @api.onchange('restrict_product_ids') + def _onchange_restrict_product_ids(self): + """To show a warning when products are given for restriction""" + if self.restrict_product_ids: + self.partner_warning = True + else: + self.partner_warning = False diff --git a/restrict_delivery_method/models/sale_order.py b/restrict_delivery_method/models/sale_order.py new file mode 100644 index 000000000..16e0ff60a --- /dev/null +++ b/restrict_delivery_method/models/sale_order.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, fields, models + + +class SaleOrder(models.Model): + """This class contains the compute function to calculate + the restricted delivery method""" + _inherit = "sale.order" + + delivery_method_ids = fields.Many2many('delivery.carrier', + string="Delivery Method", + compute= + "_compute_delivery_method_ids", + help="Select delivery method for " + "shipping", + readonly=False) + + @api.depends('order_line.product_template_id') + def _compute_delivery_method_ids(self): + """This function helps to calculate the delivery method + for a sale order based on the field in delivery + carrier model""" + for rec in self: + delivery = (self.env['delivery.carrier'].search( + [('restrict_product_ids', 'in', + rec.order_line.product_template_id.ids)])) + if delivery: + self.delivery_method_ids = [(4, ids) for ids in delivery.ids] + else: + self.delivery_method_ids = False + + def _get_restrict_delivery_method(self): + """From this function the controller gets the + restricted methods value""" + address = self.delivery_method_ids + return self.env['delivery.carrier'].sudo().search( + [('website_published', '=', True), + ('id', 'not in', address.ids)]).available_carriers( + address) diff --git a/restrict_delivery_method/static/description/assets/icons/capture (1).png b/restrict_delivery_method/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/capture (1).png differ diff --git a/restrict_delivery_method/static/description/assets/icons/check.png b/restrict_delivery_method/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/check.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/chevron.png b/restrict_delivery_method/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/chevron.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/cogs.png b/restrict_delivery_method/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/cogs.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/consultation.png b/restrict_delivery_method/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/consultation.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/ecom-black.png b/restrict_delivery_method/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/ecom-black.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/education-black.png b/restrict_delivery_method/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/education-black.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/hotel-black.png b/restrict_delivery_method/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/hotel-black.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/img.png b/restrict_delivery_method/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/img.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/license.png b/restrict_delivery_method/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/license.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/lifebuoy.png b/restrict_delivery_method/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/lifebuoy.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/manufacturing-black.png b/restrict_delivery_method/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/manufacturing-black.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/photo-capture.png b/restrict_delivery_method/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/photo-capture.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/pos-black.png b/restrict_delivery_method/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/pos-black.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/puzzle.png b/restrict_delivery_method/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/puzzle.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/restaurant-black.png b/restrict_delivery_method/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/restaurant-black.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/service-black.png b/restrict_delivery_method/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/service-black.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/trading-black.png b/restrict_delivery_method/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/trading-black.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/training.png b/restrict_delivery_method/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/training.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/update.png b/restrict_delivery_method/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/update.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/user.png b/restrict_delivery_method/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/user.png differ diff --git a/restrict_delivery_method/static/description/assets/icons/wrench.png b/restrict_delivery_method/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/restrict_delivery_method/static/description/assets/icons/wrench.png differ diff --git a/restrict_delivery_method/static/description/assets/misc/Cybrosys R.png b/restrict_delivery_method/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/misc/Cybrosys R.png differ diff --git a/restrict_delivery_method/static/description/assets/misc/email.svg b/restrict_delivery_method/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/restrict_delivery_method/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/restrict_delivery_method/static/description/assets/misc/phone.svg b/restrict_delivery_method/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/restrict_delivery_method/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/restrict_delivery_method/static/description/assets/misc/star (1) 2.svg b/restrict_delivery_method/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/restrict_delivery_method/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/restrict_delivery_method/static/description/assets/misc/support (1) 1.svg b/restrict_delivery_method/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/restrict_delivery_method/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/restrict_delivery_method/static/description/assets/misc/support-email.svg b/restrict_delivery_method/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/restrict_delivery_method/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/restrict_delivery_method/static/description/assets/misc/tick-mark.svg b/restrict_delivery_method/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/restrict_delivery_method/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/restrict_delivery_method/static/description/assets/misc/whatsapp 1.svg b/restrict_delivery_method/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/restrict_delivery_method/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/restrict_delivery_method/static/description/assets/misc/whatsapp.svg b/restrict_delivery_method/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/restrict_delivery_method/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/restrict_delivery_method/static/description/assets/modules/1.png b/restrict_delivery_method/static/description/assets/modules/1.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/modules/1.png differ diff --git a/restrict_delivery_method/static/description/assets/modules/2.png b/restrict_delivery_method/static/description/assets/modules/2.png new file mode 100644 index 000000000..a0ac2d840 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/modules/2.png differ diff --git a/restrict_delivery_method/static/description/assets/modules/3.png b/restrict_delivery_method/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/modules/3.png differ diff --git a/restrict_delivery_method/static/description/assets/modules/4.jpg b/restrict_delivery_method/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/modules/4.jpg differ diff --git a/restrict_delivery_method/static/description/assets/modules/5.png b/restrict_delivery_method/static/description/assets/modules/5.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/restrict_delivery_method/static/description/assets/modules/5.png differ diff --git a/restrict_delivery_method/static/description/assets/modules/6.jpg b/restrict_delivery_method/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..73781cf50 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/modules/6.jpg differ diff --git a/restrict_delivery_method/static/description/assets/screenshots/hero.gif b/restrict_delivery_method/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..5928fd94b Binary files /dev/null and b/restrict_delivery_method/static/description/assets/screenshots/hero.gif differ diff --git a/restrict_delivery_method/static/description/assets/screenshots/scrn_01.png b/restrict_delivery_method/static/description/assets/screenshots/scrn_01.png new file mode 100644 index 000000000..ffcc2a48b Binary files /dev/null and b/restrict_delivery_method/static/description/assets/screenshots/scrn_01.png differ diff --git a/restrict_delivery_method/static/description/assets/screenshots/scrn_02.png b/restrict_delivery_method/static/description/assets/screenshots/scrn_02.png new file mode 100644 index 000000000..709301139 Binary files /dev/null and b/restrict_delivery_method/static/description/assets/screenshots/scrn_02.png differ diff --git a/restrict_delivery_method/static/description/assets/screenshots/scrn_03.png b/restrict_delivery_method/static/description/assets/screenshots/scrn_03.png new file mode 100644 index 000000000..6775dea0f Binary files /dev/null and b/restrict_delivery_method/static/description/assets/screenshots/scrn_03.png differ diff --git a/restrict_delivery_method/static/description/assets/screenshots/scrn_04.png b/restrict_delivery_method/static/description/assets/screenshots/scrn_04.png new file mode 100644 index 000000000..c892edd5e Binary files /dev/null and b/restrict_delivery_method/static/description/assets/screenshots/scrn_04.png differ diff --git a/restrict_delivery_method/static/description/assets/screenshots/scrn_05.png b/restrict_delivery_method/static/description/assets/screenshots/scrn_05.png new file mode 100644 index 000000000..2a5dc368b Binary files /dev/null and b/restrict_delivery_method/static/description/assets/screenshots/scrn_05.png differ diff --git a/restrict_delivery_method/static/description/banner.jpg b/restrict_delivery_method/static/description/banner.jpg new file mode 100644 index 000000000..6706d162e Binary files /dev/null and b/restrict_delivery_method/static/description/banner.jpg differ diff --git a/restrict_delivery_method/static/description/icon.png b/restrict_delivery_method/static/description/icon.png new file mode 100644 index 000000000..13eaaa458 Binary files /dev/null and b/restrict_delivery_method/static/description/icon.png differ diff --git a/restrict_delivery_method/static/description/index.html b/restrict_delivery_method/static/description/index.html new file mode 100644 index 000000000..b1d53cfae --- /dev/null +++ b/restrict_delivery_method/static/description/index.html @@ -0,0 +1,582 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Restrict Delivery Method

+

+ This App Shows Restriction of Delivery Method in Sale Order + From Both Sales and Website. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

This module helps to restrict certain delivery carriers for certain + products in Odoo.

+
+
+
+
+
+
+ +
+
+

Simplified work flow

+

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

+ Add the Products which are to be restricted from + this method in the Restrict Product field.

+
+
+
+
+
+
+ +
+
+

+ Create a Sale Order with those Restricted Products.

+
+
+
+
+
+
+ +
+
+

+ The Delivery Method in which that Product is excluded + will be Restricted.

+
+
+
+
+
+
+ +
+
+

+ Create a Sale Order through Website with the Product + Restricted from a Shipping Method.

+
+
+
+
+
+
+ +
+
+

+ That Delivery Method will be hidden in Website.

+
+
+
+ + +
+
+
+
    +
  • + Simplified restriction of Delivery method. +
  • +
  • + Restrict from portal users and public users. +
  • +
  • + Simplified work flow. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:31th January 2024 +
+

+ + Initial Commit for Restrict Delivery Method.

+
+
+
+
+
+
+
+

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/restrict_delivery_method/views/delivery_carrier_views.xml b/restrict_delivery_method/views/delivery_carrier_views.xml new file mode 100644 index 000000000..8df0b0a6f --- /dev/null +++ b/restrict_delivery_method/views/delivery_carrier_views.xml @@ -0,0 +1,27 @@ + + + + + + delivery.carrier.view.form.inherit.restrict.delivery.method + + delivery.carrier + + + + + + + + + diff --git a/restrict_delivery_method/views/sale_order_views.xml b/restrict_delivery_method/views/sale_order_views.xml new file mode 100644 index 000000000..d657b2997 --- /dev/null +++ b/restrict_delivery_method/views/sale_order_views.xml @@ -0,0 +1,16 @@ + + + + + + sale.order.view.form.inherit.restrict.delivery.method + + sale.order + + + + + + + + diff --git a/restrict_delivery_method/wizards/__init__.py b/restrict_delivery_method/wizards/__init__.py new file mode 100644 index 000000000..cd79adec9 --- /dev/null +++ b/restrict_delivery_method/wizards/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (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 choose_delivery_carrier diff --git a/restrict_delivery_method/wizards/choose_delivery_carrier.py b/restrict_delivery_method/wizards/choose_delivery_carrier.py new file mode 100644 index 000000000..9515318d8 --- /dev/null +++ b/restrict_delivery_method/wizards/choose_delivery_carrier.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B (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 ChooseDeliveryCarrier(models.TransientModel): + """This class contains the fields in wizard which is related + to that particular sale order""" + _inherit = "choose.delivery.carrier" + + delivery_method_ids = fields.Many2many('delivery.carrier', + related='order_id.' + 'delivery_method_ids', + help="Choose the delivery method") diff --git a/restrict_delivery_method/wizards/choose_delivery_method_views.xml b/restrict_delivery_method/wizards/choose_delivery_method_views.xml new file mode 100644 index 000000000..906db264a --- /dev/null +++ b/restrict_delivery_method/wizards/choose_delivery_method_views.xml @@ -0,0 +1,22 @@ + + + + + + choose.delivery.carrier.view.form.inherit.restrict.delivery.method + + choose.delivery.carrier + + + + [('id', 'in', available_carrier_ids),('id', 'not in', delivery_method_ids)] + + + + + + +