diff --git a/package_split/README.rst b/package_split/README.rst new file mode 100644 index 000000000..e6c344bce --- /dev/null +++ b/package_split/README.rst @@ -0,0 +1,46 @@ +.. 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 + +Categorize & Pack Products +========================== +Effortlessly Categorize And Pack Your Products Based on Package Categories. + +Configuration +============= +* No additional configurations needed + +License +------- +Gnu Affero General Public License, v3.0 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer : (V16) Muhsina V, 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/package_split/__init__.py b/package_split/__init__.py new file mode 100644 index 000000000..ddfa2cc7b --- /dev/null +++ b/package_split/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 models +from . import wizard diff --git a/package_split/__manifest__.py b/package_split/__manifest__.py new file mode 100644 index 000000000..2da2a3ccb --- /dev/null +++ b/package_split/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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': 'Categorize & Pack Products', + 'version': '16.0.1.0.0', + 'category': 'Sales', + 'summary': 'Split the packages based on package category.', + 'description': """This module allows users to split products packages + based on the package category given inside the product.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale_management', 'stock', 'delivery'], + 'data': [ + 'security/ir.model.access.csv', + 'views/package_category_views.xml', + 'views/product_template_views.xml', + 'views/res_config_settings_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'licence': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/package_split/doc/RELEASE_NOTES.md b/package_split/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..0d9efb3a6 --- /dev/null +++ b/package_split/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 23.11.2023 +#### Version 16.0.1.0.0 +##### ADD +- Initial Commit for Categorize & Pack Products diff --git a/package_split/models/__init__.py b/package_split/models/__init__.py new file mode 100644 index 000000000..450e594bb --- /dev/null +++ b/package_split/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 package_category +from . import product_template +from . import res_config_settings +from . import stock_picking diff --git a/package_split/models/package_category.py b/package_split/models/package_category.py new file mode 100644 index 000000000..a765b909b --- /dev/null +++ b/package_split/models/package_category.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 PackageCategory(models.Model): + """model to create package category""" + _name = 'package.category' + _description = 'Package Category' + _inherit = 'mail.thread' + + name = fields.Char(string="Package Category", required=True, + help="Category of the product to pack") diff --git a/package_split/models/product_template.py b/package_split/models/product_template.py new file mode 100644 index 000000000..9d58d8173 --- /dev/null +++ b/package_split/models/product_template.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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): + """Inhering to add new field for package category""" + _inherit = 'product.template' + + package_category_id = fields.Many2one( + 'package.category', string="Package Category", help="Package category") + package_split_value = fields.Boolean( + string='Package Split Value', compute='_compute_package_split_value', + help="This field value is set to true if the field to enable package " + "split is enabled") + + def _compute_package_split_value(self): + """function to set value to the field package_split_value from + system parameter""" + self.package_split_value = self.env['ir.config_parameter'].sudo( + ).get_param( + 'package_split.enable_package_split') diff --git a/package_split/models/res_config_settings.py b/package_split/models/res_config_settings.py new file mode 100644 index 000000000..5a96fbbbd --- /dev/null +++ b/package_split/models/res_config_settings.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 ResConfigSettings(models.TransientModel): + """ Inhering to Add a field to enable Package split""" + _inherit = 'res.config.settings' + + enable_package_split = fields.Boolean( + string='Package Split', + config_parameter='package_split.enable_package_split', + compute='_compute_enable_package_split', + help="Enable package split feature") + + @api.depends('group_stock_tracking_lot') + def _compute_enable_package_split(self): + """on enabling packages it enables the field enable_package_split""" + self.enable_package_split = self.group_stock_tracking_lot diff --git a/package_split/models/stock_picking.py b/package_split/models/stock_picking.py new file mode 100644 index 000000000..26276991e --- /dev/null +++ b/package_split/models/stock_picking.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 models +from odoo.tools import float_compare, float_is_zero, float_round +from odoo.addons.stock.models.stock_picking import Picking + + +class Picking(models.Model): + """Inheriting the stock picking model to change the package creation method + based on package category provided inside the product form.""" + _inherit = 'stock.picking' + + def _put_in_pack(self, move_line_ids, create_package_level=True): + """For each product in the orderline with the same package category, + it creates packages and adds the corresponding products into the + package when validating the delivery""" + packages = {} + precision_digits = self.env['decimal.precision'].precision_get( + 'Product Unit of Measure') + if float_is_zero(move_line_ids[0].qty_done, + precision_digits=precision_digits): + for line in move_line_ids: + line.qty_done = line.reserved_uom_qty + for move_line in move_line_ids: + if float_compare(move_line.qty_done, move_line.reserved_uom_qty, + precision_rounding=move_line.product_uom_id.rounding + ) >= 0: + if not move_line.product_id.package_category_id: + package_category_value = 'Others' + category_name = "" + else: + package_category_value = move_line.product_id.package_category_id.name + category_name = '-' + move_line.product_id.package_category_id.name + if package_category_value not in packages: + packages[package_category_value] = self.env[ + 'stock.quant.package'].create({}) + packages[ + package_category_value].name += category_name + move_line.write( + {'result_package_id': packages[package_category_value].id}) + else: + quantity_left_todo = float_round( + move_line.reserved_uom_qty - move_line.qty_done, + precision_rounding=move_line.product_uom_id.rounding, + rounding_method='HALF-UP') + done_to_keep = move_line.qty_done + new_move_line = move_line.copy( + default={'reserved_uom_qty': 0, + 'qty_done': move_line.qty_done}) + vals = {'reserved_uom_qty': quantity_left_todo, 'qty_done': 0.0 + } + if move_line.picking_id.picking_type_id.code == 'incoming': + if move_line.lot_id: + vals['lot_id'] = False + if move_line.lot_name: + vals['lot_name'] = False + move_line.write(vals) + new_move_line.write({'reserved_uom_qty': done_to_keep}) + if not move_line.product_id.package_category_id: + package_category_value = 'Others' + category_name = "" + else: + package_category_value = move_line.product_id.package_category_id.name + category_name = '-' + move_line.product_id.package_category_id.name + if package_category_value not in packages: + packages[package_category_value] = self.env[ + 'stock.quant.package'].create({}) + packages[ + package_category_value].name += category_name + new_move_line.write( + {'result_package_id': packages[package_category_value].id}) + if create_package_level: + for package_category_value, package in packages.items(): + grouped_move_lines = move_line_ids.filtered( + lambda l: l.product_id.package_category_id.name == + package_category_value) + if not grouped_move_lines: + continue + self.env['stock.package_level'].create({ + 'package_id': package.id, + 'picking_id': grouped_move_lines[ + 0].picking_id.id if grouped_move_lines else False, + 'location_id': False, + 'location_dest_id': grouped_move_lines.mapped( + 'location_dest_id').id, + 'move_line_ids': [(6, 0, grouped_move_lines.ids)], + 'company_id': grouped_move_lines[0].company_id.id, + }) + return list(packages.values()) + + Picking._put_in_pack = _put_in_pack diff --git a/package_split/security/ir.model.access.csv b/package_split/security/ir.model.access.csv new file mode 100644 index 000000000..2b5b0def2 --- /dev/null +++ b/package_split/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_package_category_user,access.package.category.user,model_package_category,base.group_user,1,1,1,1 diff --git a/package_split/static/description/assets/icons/check.png b/package_split/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/package_split/static/description/assets/icons/check.png differ diff --git a/package_split/static/description/assets/icons/chevron.png b/package_split/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/package_split/static/description/assets/icons/chevron.png differ diff --git a/package_split/static/description/assets/icons/cogs.png b/package_split/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/package_split/static/description/assets/icons/cogs.png differ diff --git a/package_split/static/description/assets/icons/consultation.png b/package_split/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/package_split/static/description/assets/icons/consultation.png differ diff --git a/package_split/static/description/assets/icons/ecom-black.png b/package_split/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/package_split/static/description/assets/icons/ecom-black.png differ diff --git a/package_split/static/description/assets/icons/education-black.png b/package_split/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/package_split/static/description/assets/icons/education-black.png differ diff --git a/package_split/static/description/assets/icons/hotel-black.png b/package_split/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/package_split/static/description/assets/icons/hotel-black.png differ diff --git a/package_split/static/description/assets/icons/license.png b/package_split/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/package_split/static/description/assets/icons/license.png differ diff --git a/package_split/static/description/assets/icons/lifebuoy.png b/package_split/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/package_split/static/description/assets/icons/lifebuoy.png differ diff --git a/package_split/static/description/assets/icons/manufacturing-black.png b/package_split/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/package_split/static/description/assets/icons/manufacturing-black.png differ diff --git a/package_split/static/description/assets/icons/pos-black.png b/package_split/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/package_split/static/description/assets/icons/pos-black.png differ diff --git a/package_split/static/description/assets/icons/puzzle.png b/package_split/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/package_split/static/description/assets/icons/puzzle.png differ diff --git a/package_split/static/description/assets/icons/restaurant-black.png b/package_split/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/package_split/static/description/assets/icons/restaurant-black.png differ diff --git a/package_split/static/description/assets/icons/service-black.png b/package_split/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/package_split/static/description/assets/icons/service-black.png differ diff --git a/package_split/static/description/assets/icons/trading-black.png b/package_split/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/package_split/static/description/assets/icons/trading-black.png differ diff --git a/package_split/static/description/assets/icons/training.png b/package_split/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/package_split/static/description/assets/icons/training.png differ diff --git a/package_split/static/description/assets/icons/update.png b/package_split/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/package_split/static/description/assets/icons/update.png differ diff --git a/package_split/static/description/assets/icons/user.png b/package_split/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/package_split/static/description/assets/icons/user.png differ diff --git a/package_split/static/description/assets/icons/wrench.png b/package_split/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/package_split/static/description/assets/icons/wrench.png differ diff --git a/package_split/static/description/assets/misc/categories.png b/package_split/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/package_split/static/description/assets/misc/categories.png differ diff --git a/package_split/static/description/assets/misc/check-box.png b/package_split/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/package_split/static/description/assets/misc/check-box.png differ diff --git a/package_split/static/description/assets/misc/compass.png b/package_split/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/package_split/static/description/assets/misc/compass.png differ diff --git a/package_split/static/description/assets/misc/corporate.png b/package_split/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/package_split/static/description/assets/misc/corporate.png differ diff --git a/package_split/static/description/assets/misc/customer-support.png b/package_split/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/package_split/static/description/assets/misc/customer-support.png differ diff --git a/package_split/static/description/assets/misc/cybrosys-logo.png b/package_split/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/package_split/static/description/assets/misc/cybrosys-logo.png differ diff --git a/package_split/static/description/assets/misc/features.png b/package_split/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/package_split/static/description/assets/misc/features.png differ diff --git a/package_split/static/description/assets/misc/logo.png b/package_split/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/package_split/static/description/assets/misc/logo.png differ diff --git a/package_split/static/description/assets/misc/pictures.png b/package_split/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/package_split/static/description/assets/misc/pictures.png differ diff --git a/package_split/static/description/assets/misc/pie-chart.png b/package_split/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/package_split/static/description/assets/misc/pie-chart.png differ diff --git a/package_split/static/description/assets/misc/right-arrow.png b/package_split/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/package_split/static/description/assets/misc/right-arrow.png differ diff --git a/package_split/static/description/assets/misc/star.png b/package_split/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/package_split/static/description/assets/misc/star.png differ diff --git a/package_split/static/description/assets/misc/support.png b/package_split/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/package_split/static/description/assets/misc/support.png differ diff --git a/package_split/static/description/assets/misc/whatsapp.png b/package_split/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/package_split/static/description/assets/misc/whatsapp.png differ diff --git a/package_split/static/description/assets/modules/1.png b/package_split/static/description/assets/modules/1.png new file mode 100644 index 000000000..464c117b6 Binary files /dev/null and b/package_split/static/description/assets/modules/1.png differ diff --git a/package_split/static/description/assets/modules/2.png b/package_split/static/description/assets/modules/2.png new file mode 100644 index 000000000..80cae6c45 Binary files /dev/null and b/package_split/static/description/assets/modules/2.png differ diff --git a/package_split/static/description/assets/modules/3.png b/package_split/static/description/assets/modules/3.png new file mode 100644 index 000000000..af598ebfa Binary files /dev/null and b/package_split/static/description/assets/modules/3.png differ diff --git a/package_split/static/description/assets/modules/4.png b/package_split/static/description/assets/modules/4.png new file mode 100644 index 000000000..c1f30354a Binary files /dev/null and b/package_split/static/description/assets/modules/4.png differ diff --git a/package_split/static/description/assets/modules/5.png b/package_split/static/description/assets/modules/5.png new file mode 100644 index 000000000..e4454e09b Binary files /dev/null and b/package_split/static/description/assets/modules/5.png differ diff --git a/package_split/static/description/assets/modules/6.png b/package_split/static/description/assets/modules/6.png new file mode 100644 index 000000000..ed99b5959 Binary files /dev/null and b/package_split/static/description/assets/modules/6.png differ diff --git a/package_split/static/description/assets/screenshots/1.png b/package_split/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..a2b1ac023 Binary files /dev/null and b/package_split/static/description/assets/screenshots/1.png differ diff --git a/package_split/static/description/assets/screenshots/2.png b/package_split/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..140b7e1f8 Binary files /dev/null and b/package_split/static/description/assets/screenshots/2.png differ diff --git a/package_split/static/description/assets/screenshots/3.png b/package_split/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..b474fddc1 Binary files /dev/null and b/package_split/static/description/assets/screenshots/3.png differ diff --git a/package_split/static/description/assets/screenshots/4.png b/package_split/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..12148877c Binary files /dev/null and b/package_split/static/description/assets/screenshots/4.png differ diff --git a/package_split/static/description/assets/screenshots/5.png b/package_split/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..8a74afc33 Binary files /dev/null and b/package_split/static/description/assets/screenshots/5.png differ diff --git a/package_split/static/description/assets/screenshots/6.png b/package_split/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..c2d50c83c Binary files /dev/null and b/package_split/static/description/assets/screenshots/6.png differ diff --git a/package_split/static/description/assets/screenshots/7.png b/package_split/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..cf427163e Binary files /dev/null and b/package_split/static/description/assets/screenshots/7.png differ diff --git a/package_split/static/description/assets/screenshots/8.png b/package_split/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..d04acd0a7 Binary files /dev/null and b/package_split/static/description/assets/screenshots/8.png differ diff --git a/package_split/static/description/assets/screenshots/hero.gif b/package_split/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..91fedb489 Binary files /dev/null and b/package_split/static/description/assets/screenshots/hero.gif differ diff --git a/package_split/static/description/banner.jpg b/package_split/static/description/banner.jpg new file mode 100644 index 000000000..6ce6995d6 Binary files /dev/null and b/package_split/static/description/banner.jpg differ diff --git a/package_split/static/description/icon.png b/package_split/static/description/icon.png new file mode 100644 index 000000000..96336bd87 Binary files /dev/null and b/package_split/static/description/icon.png differ diff --git a/package_split/static/description/index.html b/package_split/static/description/index.html new file mode 100644 index 000000000..b6cf666a8 --- /dev/null +++ b/package_split/static/description/index.html @@ -0,0 +1,672 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Categorize & Pack Products +

+

+ Effortlessly Categorize And Pack Your Products Based on Package Categories. +

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module helps to split the packages based on the package category + of each product, + if the packages in inventory configuration is enabled. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Set Package Category for Products. + +
+
+ + Multiple Packages Created Based on Category. +
+
+
+
+ + Available in Odoo 16.0 + Community and Enterprise. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Enable Packages +

+

+ Go to Sales / Inventory Configuration => Settings => Packages. + On enabling Packages , Package Split feature is also + enabled.

+ +
+
+

+ Create Package Categories +

+

+ Now we can create package categories from + Sale => Products => Package Category, + .

+ +
+
+

+ Choose Package Category +

+

+ On enabling the package split, a field to add package category + is enabled inside the product page, and we can create/set the + category.

+ +
+
+

+ Create Sale Order & Put in Pack. +

+

+ Now create the sale order & confirm. Inside the delivery by + setting the quantity done click put in pack.

+ +
+
+

+ Now packages are created.Then validate the delivery.

+ +
+
+

+ Multiple Packages +

+

+ Multiple packages are created based on product package + category.

+ +
+
+

+ Corresponding Products are added in each package.

+ +
+
+

+

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

+ Related + Products +

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

+ Our Services +

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

+ Our + Industries +

+
+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

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

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/package_split/views/package_category_views.xml b/package_split/views/package_category_views.xml new file mode 100644 index 000000000..f14a0cf9c --- /dev/null +++ b/package_split/views/package_category_views.xml @@ -0,0 +1,35 @@ + + + + + package.category.view.tree + package.category + + + + + + + + + package.category.view.form + package.category + +
+ + + +
+
+
+ + + Package Category + package.category + tree + + + +
diff --git a/package_split/views/product_template_views.xml b/package_split/views/product_template_views.xml new file mode 100644 index 000000000..84ecb8c1d --- /dev/null +++ b/package_split/views/product_template_views.xml @@ -0,0 +1,15 @@ + + + + product.template.view.form.inherit.package.split + product.template + + + + + + + + + + diff --git a/package_split/views/res_config_settings_views.xml b/package_split/views/res_config_settings_views.xml new file mode 100644 index 000000000..419d45fdf --- /dev/null +++ b/package_split/views/res_config_settings_views.xml @@ -0,0 +1,26 @@ + + + + res.config.settings.view.form.inherit.package.split + res.config.settings + + + + + +
+ +
+
+
+
+
+
+
diff --git a/package_split/wizard/__init__.py b/package_split/wizard/__init__.py new file mode 100644 index 000000000..1c5c6a5cb --- /dev/null +++ b/package_split/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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_package diff --git a/package_split/wizard/choose_delivery_package.py b/package_split/wizard/choose_delivery_package.py new file mode 100644 index 000000000..28b04c465 --- /dev/null +++ b/package_split/wizard/choose_delivery_package.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 models +from odoo.tools import float_compare + + +class ChooseDeliveryPackage(models.TransientModel): + """This model extends the 'choose.delivery.package' wizard to modify the + behavior of putting products into packages during the delivery process. + It customizes the package creation and updates the package type and + shipping weight for each package based on the chosen delivery package type + and shipping weight.""" + _inherit = 'choose.delivery.package' + + def action_put_in_pack(self): + """Override the action_put_in_pack method to modify the behavior of + putting products into packages during the delivery process. + This method customizes the package creation and updates the package + type and shipping weight for each package. + :return: True if the action is successful""" + picking_move_lines = self.picking_id.move_line_ids + if not self.picking_id.picking_type_id.show_reserved and not self.env.context.get( + 'barcode_view'): + picking_move_lines = self.picking_id.move_line_nosuggest_ids + move_line_ids = picking_move_lines.filtered( + lambda ml: float_compare(ml.qty_done, 0.0, + precision_rounding=ml.product_uom_id.rounding) > 0 + and not ml.result_package_id) + if not move_line_ids: + move_line_ids = picking_move_lines.filtered( + lambda ml: float_compare(ml.reserved_uom_qty, 0.0, + precision_rounding=ml.product_uom_id.rounding) > 0 and float_compare(ml.qty_done, 0.0, + precision_rounding=ml.product_uom_id.rounding) == 0) + delivery_packages = self.picking_id._put_in_pack(move_line_ids) + # Loop through each package and write shipping weight and package type + # on 'stock_quant_package' if needed + for package in delivery_packages: + if self.delivery_package_type_id: + package.write( + {'package_type_id': self.delivery_package_type_id.id}) + if self.shipping_weight: + package.write({'shipping_weight': self.shipping_weight})