From 59dc71e7cb7d4a1a841a4c82ffe832cc6d2d7bf6 Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Thu, 8 Jun 2023 09:45:36 +0200 Subject: [PATCH 01/43] Add shopfloor_reception_packaging_dimension --- .../__init__.py | 3 + .../__manifest__.py | 16 ++ .../hooks.py | 40 ++++ .../models/__init__.py | 1 + .../models/shopfloor_menu.py | 24 +++ .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 5 + .../services/__init__.py | 1 + .../services/reception.py | 197 ++++++++++++++++++ .../tests/__init__.py | 1 + .../tests/test_set_package_dimension.py | 160 ++++++++++++++ .../views/shopfloor_menu.xml | 20 ++ 12 files changed, 469 insertions(+) create mode 100644 shopfloor_reception_packaging_dimension/__init__.py create mode 100644 shopfloor_reception_packaging_dimension/__manifest__.py create mode 100644 shopfloor_reception_packaging_dimension/hooks.py create mode 100644 shopfloor_reception_packaging_dimension/models/__init__.py create mode 100644 shopfloor_reception_packaging_dimension/models/shopfloor_menu.py create mode 100644 shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.rst create mode 100644 shopfloor_reception_packaging_dimension/readme/DESCRIPTION.rst create mode 100644 shopfloor_reception_packaging_dimension/services/__init__.py create mode 100644 shopfloor_reception_packaging_dimension/services/reception.py create mode 100644 shopfloor_reception_packaging_dimension/tests/__init__.py create mode 100644 shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py create mode 100644 shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml diff --git a/shopfloor_reception_packaging_dimension/__init__.py b/shopfloor_reception_packaging_dimension/__init__.py new file mode 100644 index 00000000000..e7386302bbe --- /dev/null +++ b/shopfloor_reception_packaging_dimension/__init__.py @@ -0,0 +1,3 @@ +from .hooks import post_init_hook, uninstall_hook +from . import models +from . import services diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py new file mode 100644 index 00000000000..08566851e0f --- /dev/null +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -0,0 +1,16 @@ +{ + "name": "Shopfloor Reception Packaging Dimension", + "summary": "Collect Packaging Dimension from the Reception scenario", + "version": "14.0.1.0.0", + "development_status": "Beta", + "category": "Inventory", + "website": "https://github.com/OCA/wms", + "author": "Camptocamp, Odoo Community Association (OCA)", + "maintainers": ["TDu"], + "license": "AGPL-3", + "installable": True, + "depends": ["shopfloor_reception"], + "data": ["views/shopfloor_menu.xml"], + "post_init_hook": "post_init_hook", + "uninstall_hook": "uninstall_hook", +} diff --git a/shopfloor_reception_packaging_dimension/hooks.py b/shopfloor_reception_packaging_dimension/hooks.py new file mode 100644 index 00000000000..00c46969c7f --- /dev/null +++ b/shopfloor_reception_packaging_dimension/hooks.py @@ -0,0 +1,40 @@ +# Copyright 2023 Camptocamp SA (http://www.camptocamp.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import json +import logging + +from odoo import SUPERUSER_ID, api + +from odoo.addons.shopfloor_base.utils import purge_endpoints, register_new_services + +from .services.reception import Reception as Service + +_logger = logging.getLogger(__file__) + + +def post_init_hook(cr, registry): + _logger.info("Add set packaging dimension option on reception scenario") + env = api.Environment(cr, SUPERUSER_ID, {}) + scenario = env.ref("shopfloor_reception.scenario_reception") + options = scenario.options + options.update({"set_packaging_dimension": True}) + scenario.options_edit = json.dumps(options) + # The service imported is extending an existing component + # As it is a simple python import the odoo inheritance is not working + # So it needs to be fix + Service._usage = "reception" + Service._name = "shopfloor.reception" + register_new_services(env, Service) + + +def uninstall_hook(cr, registry): + _logger.info("Remove set packaging dimension option on reception scenario") + env = api.Environment(cr, SUPERUSER_ID, {}) + scenario = env.ref("shopfloor_reception.scenario_reception") + options = scenario.options + if "set_packaging_dimension" in options.keys(): + options.pop("set_packaging_dimension") + scenario.options_edit = json.dumps(options) + Service._usage = "reception" + purge_endpoints(env, Service._usage, endpoint="set_packaging_dimension") diff --git a/shopfloor_reception_packaging_dimension/models/__init__.py b/shopfloor_reception_packaging_dimension/models/__init__.py new file mode 100644 index 00000000000..8bd3d5195ca --- /dev/null +++ b/shopfloor_reception_packaging_dimension/models/__init__.py @@ -0,0 +1 @@ +from . import shopfloor_menu diff --git a/shopfloor_reception_packaging_dimension/models/shopfloor_menu.py b/shopfloor_reception_packaging_dimension/models/shopfloor_menu.py new file mode 100644 index 00000000000..6cf71a58de0 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/models/shopfloor_menu.py @@ -0,0 +1,24 @@ +# Copyright 2023 Camptocamp SA (http://www.camptocamp.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo import api, fields, models + + +class ShopfloorMenu(models.Model): + _inherit = "shopfloor.menu" + + set_packaging_dimension_is_possible = fields.Boolean( + compute="_compute_set_packaging_dimension_is_possible" + ) + set_packaging_dimension = fields.Boolean( + string="Set packaging dimension", + default=False, + help="If for the product being processed, its related packaging " + "dimension are not set, ask to fill them up.", + ) + + @api.depends("scenario_id") + def _compute_set_packaging_dimension_is_possible(self): + for menu in self: + menu.set_packaging_dimension_is_possible = menu.scenario_id.has_option( + "set_packaging_dimension" + ) diff --git a/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.rst b/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..0dd376faecb --- /dev/null +++ b/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Thierry Ducrest diff --git a/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.rst b/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..fe5faf19ae4 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +This module adds an option to the reception scenario. +When activated. Before setting the quantity for the reception, +if there is product packaging related to the product received with +missing information, the user will be presented with a screen +(for each packaging) proposing to update the missing information. diff --git a/shopfloor_reception_packaging_dimension/services/__init__.py b/shopfloor_reception_packaging_dimension/services/__init__.py new file mode 100644 index 00000000000..aa19bba8ce4 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/services/__init__.py @@ -0,0 +1 @@ +from . import reception diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py new file mode 100644 index 00000000000..ccb43afa548 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -0,0 +1,197 @@ +# Copyright 2023 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo.addons.base_rest.components.service import to_int +from odoo.addons.component.core import Component +from odoo.addons.shopfloor.utils import to_float + + +class Reception(Component): + _inherit = "shopfloor.reception" + + packaging_update_done = False + + def _before_state__set_quantity(self, picking, line, message=None): + """Show the packaging dimension screen before the set quantity screen.""" + if self.work.menu.set_packaging_dimension and not self.packaging_update_done: + packaging = self._get_next_packaging_to_set_dimension(line.product_id) + if packaging: + return self._response_for_set_packaging_dimension( + picking, line, packaging, message=message + ) + return super()._before_state__set_quantity(picking, line, message=message) + + def _get_next_packaging_to_set_dimension(self, product, previous_packaging=None): + """Return for a product the next packaging needing dimension to be set.""" + next_packaging_id = previous_packaging.id + 1 if previous_packaging else 0 + domain = [ + ("product_id", "=", product.id), + ("id", ">=", next_packaging_id), + "|", + "|", + "|", + "|", + "|", + "|", + "|", + "|", + "|", + "|", + ("packaging_length", "=", 0), + ("packaging_length", "=", False), + ("width", "=", 0), + ("width", "=", False), + ("height", "=", 0), + ("height", "=", False), + ("max_weight", "=", 0), + ("max_weight", "=", False), + ("qty", "=", 0), + ("qty", "=", False), + ("barcode", "=", False), + ] + return self.env["product.packaging"].search(domain, order="id", limit=1) + + def _response_for_set_packaging_dimension( + self, picking, line, packaging, message=None + ): + return self._response( + next_state="set_packaging_dimension", + data={ + "picking": self.data.picking(picking), + "selected_move_line": self.data.move_line(line), + "packaging": self.data_detail.packaging_detail(packaging), + }, + message=message, + ) + + def set_packaging_dimension( + self, picking_id, selected_line_id, packaging_id, cancel=False, **kwargs + ): + """Set the dimension on a product packaging. + + If the user cancel the dimension update we still propose the next + possible packgaging. + + Transitions: + - set_packaging_dimension: if more packaging needs dimension + - set_quantity: otherwise + """ + picking = self.env["stock.picking"].browse(picking_id) + selected_line = self.env["stock.move.line"].browse(selected_line_id) + packaging = self.env["product.packaging"].sudo().browse(packaging_id) + message = None + next_packaging = None + if not packaging: + message = self.msg_store.record_not_found() + elif not cancel and self._check_dimension_to_update(kwargs): + self._update_packaging_dimension(packaging, kwargs) + message = self.msg_store.packaging_dimension_updated(packaging) + + if packaging: + next_packaging = self._get_next_packaging_to_set_dimension( + selected_line.product_id, packaging + ) + if next_packaging: + return self._response_for_set_packaging_dimension( + picking, selected_line, next_packaging, message=message + ) + self.packaging_update_done = True + return self._before_state__set_quantity(picking, selected_line, message=message) + + def _check_dimension_to_update(self, dimensions): + """Return True if there is any dimension that needs to be updated on the packaging.""" + return any([value is not None for key, value in dimensions.items()]) + + def _get_dimension_fields_conversion_map(self): + return {"length": "packaging_length"} + + def _update_packaging_dimension(self, packaging, dimensions_to_update): + """Update dimension on the packaging.""" + fields_conv_map = self._get_dimension_fields_conversion_map() + for dimension, value in dimensions_to_update.items(): + if value is not None: + dimension = fields_conv_map.get(dimension, dimension) + packaging[dimension] = value + + +class ShopfloorReceptionValidator(Component): + _inherit = "shopfloor.reception.validator" + + def set_packaging_dimension(self): + return { + "picking_id": {"coerce": to_int, "required": True, "type": "integer"}, + "selected_line_id": { + "coerce": to_int, + "required": True, + "type": "integer", + }, + "packaging_id": {"coerce": to_int, "required": True, "type": "integer"}, + "height": { + "coerce": to_float, + "required": False, + "type": "float", + "nullable": True, + }, + "length": { + "coerce": to_float, + "required": False, + "type": "float", + "nullable": True, + }, + "width": { + "coerce": to_float, + "required": False, + "type": "float", + "nullable": True, + }, + "max_weight": { + "coerce": to_float, + "required": False, + "type": "float", + "nullable": True, + }, + "shipping_weight": { + "coerce": to_float, + "required": False, + "type": "float", + "nullable": True, + }, + "qty": { + "coerce": to_float, + "required": False, + "type": "float", + "nullable": True, + }, + "barcode": {"type": "string", "required": False, "nullable": True}, + "cancel": {"type": "boolean"}, + } + + +class ShopfloorReceptionValidatorResponse(Component): + _inherit = "shopfloor.reception.validator.response" + + def _states(self): + res = super()._states() + res.update({"set_packaging_dimension": self._schema_set_packaging_dimension}) + return res + + def _scan_line_next_states(self): + res = super()._scan_line_next_states() + res.update({"set_packaging_dimension"}) + return res + + def _set_lot_confirm_action_next_states(self): + res = super()._set_lot_confirm_action_next_states() + res.update({"set_packaging_dimension"}) + return res + + @property + def _schema_set_packaging_dimension(self): + return { + "picking": {"type": "dict", "schema": self.schemas.picking()}, + "selected_move_line": {"type": "dict", "schema": self.schemas.move_line()}, + "packaging": { + "type": "dict", + "schema": self.schemas_detail.packaging_detail(), + }, + } diff --git a/shopfloor_reception_packaging_dimension/tests/__init__.py b/shopfloor_reception_packaging_dimension/tests/__init__.py new file mode 100644 index 00000000000..2c166ca4fd7 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/tests/__init__.py @@ -0,0 +1 @@ +from . import test_set_package_dimension diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py new file mode 100644 index 00000000000..52248ee2a1c --- /dev/null +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -0,0 +1,160 @@ +# Copyright 2023 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo.addons.shopfloor_reception.tests.common import CommonCase + + +class TestSetPackDimension(CommonCase): + @classmethod + def setUpClassBaseData(cls): + super().setUpClassBaseData() + # Activate the option to use the module + cls.menu.sudo().set_packaging_dimension = True + cls.picking = cls._create_picking( + lines=[(cls.product_a, 10), (cls.product_b, 10), (cls.product_c, 10)] + ) + # Picking has 3 products + # Product A with one packaging + # Product B with no packaging + cls.product_b.packaging_ids = [(5, 0, 0)] + # Product C with 2 packaging + cls.product_c_packaging_2 = ( + cls.env["product.packaging"] + .sudo() + .create( + { + "name": "Big Box", + "product_id": cls.product_c.id, + "barcode": "ProductCBigBox", + "qty": 6, + } + ) + ) + + cls.line_with_packaging = cls.picking.move_line_ids[0] + cls.line_without_packaging = cls.picking.move_line_ids[1] + + def _assert_response_set_dimension( + self, response, picking, line, packaging, message=None + ): + data = { + "picking": self.data.picking(picking), + "selected_move_line": self.data.move_line(line), + "packaging": self.data_detail.packaging_detail(packaging), + } + self.assert_response( + response, + next_state="set_packaging_dimension", + data=data, + message=message, + ) + + def test_scan_product_ask_for_dimension(self): + self.product_a.tracking = "none" + # self._add_package(self.picking) + self.assertTrue(self.product_a.packaging_ids) + response = self.service.dispatch( + "scan_line", + params={ + "picking_id": self.picking.id, + "barcode": self.product_a.barcode, + }, + ) + self.data.picking(self.picking) + selected_move_line = self.picking.move_line_ids.filtered( + lambda l: l.product_id == self.product_a + ) + self._assert_response_set_dimension( + response, self.picking, selected_move_line, self.product_a_packaging + ) + + # TODO : Have questions on how the lot information is commited by the frontend + # + # def test_scan_lot_ask_for_dimension(self): + # self.product_a.tracking = "none" + # self.assertTrue(self.product_a.packaging_ids) + # response = self.service.dispatch( + # "set_lot_confirmation_action", + # params={ + # "picking_id": self.picking.id, + # "barcode": self.product_a.barcode, + # }, + # ) + # self.data.picking(self.picking) + # selected_move_line = self.picking.move_line_ids.filtered( + # lambda l: l.product_id == self.product_a + # ) + # self._assert_response_set_dimension( + # response, self.picking, selected_move_line, self.product_a_packaging + # ) + + def test_set_packaging_dimension(self): + selected_move_line = self.picking.move_line_ids.filtered( + lambda l: l.product_id == self.product_a + ) + self.service.dispatch( + "set_packaging_dimension", + params={ + "picking_id": self.picking.id, + "selected_line_id": selected_move_line.id, + "packaging_id": self.product_a_packaging.id, + "height": 55, + "qty": 34, + "barcode": "barcode", + }, + ) + self.assertEqual(self.product_a_packaging.height, 55) + self.assertEqual(self.product_a_packaging.barcode, "barcode") + self.assertEqual(self.product_a_packaging.qty, 34) + + def test_set_multiple_packaging_dimension(self): + line = self.picking.move_line_ids.filtered( + lambda l: l.product_id == self.product_c + ) + # Set the weight but other dimension are required + self.product_c_packaging_2.max_weight = 200 + response = self.service.dispatch( + "set_packaging_dimension", + params={ + "picking_id": self.picking.id, + "selected_line_id": line.id, + "packaging_id": self.product_c_packaging.id, + "height": 55, + "length": 233, + }, + ) + self.assertEqual(self.product_c_packaging.height, 55) + self.assertEqual(self.product_c_packaging.packaging_length, 233) + self._assert_response_set_dimension( + response, + self.picking, + line, + self.product_c_packaging_2, + message=self.msg_store.packaging_dimension_updated( + self.product_c_packaging + ), + ) + response = self.service.dispatch( + "set_packaging_dimension", + params={ + "picking_id": self.picking.id, + "selected_line_id": line.id, + "packaging_id": self.product_c_packaging_2.id, + "height": 200, + "max_weight": 1000, + }, + ) + self.assertEqual(self.product_c_packaging_2.height, 200) + self.assertEqual(self.product_c_packaging_2.max_weight, 1000) + self.assert_response( + response, + next_state="set_quantity", + data={ + "picking": self.data.picking(self.picking), + "selected_move_line": self.data.move_lines(line), + "confirmation_required": False, + }, + message=self.msg_store.packaging_dimension_updated( + self.product_c_packaging_2 + ), + ) diff --git a/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml b/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml new file mode 100644 index 00000000000..9c0f6502406 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml @@ -0,0 +1,20 @@ + + + + shopfloor.menu + + + + + + + + + + + + + From 34118417c5bc40efde57356acbe6417d6ac06d31 Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Tue, 11 Jul 2023 08:06:26 +0200 Subject: [PATCH 02/43] sh_reception_packaging_dimension: refactor to allow module to extend --- .../services/reception.py | 44 +++++++++---------- .../tests/test_set_package_dimension.py | 39 ++++++++-------- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index ccb43afa548..b87458df11b 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -1,6 +1,8 @@ # Copyright 2023 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +from odoo.osv import expression + from odoo.addons.base_rest.components.service import to_int from odoo.addons.component.core import Component from odoo.addons.shopfloor.utils import to_float @@ -21,34 +23,32 @@ def _before_state__set_quantity(self, picking, line, message=None): ) return super()._before_state__set_quantity(picking, line, message=message) + def _get_domain_packaging_needs_dimension(self): + return expression.OR( + [ + [("packaging_length", "=", 0)], + [("packaging_length", "=", False)], + [("width", "=", 0)], + [("width", "=", False)], + [("height", "=", 0)], + [("height", "=", False)], + [("max_weight", "=", 0)], + [("max_weight", "=", False)], + [("qty", "=", 0)], + [("qty", "=", False)], + [("barcode", "=", False)], + ] + ) + def _get_next_packaging_to_set_dimension(self, product, previous_packaging=None): """Return for a product the next packaging needing dimension to be set.""" next_packaging_id = previous_packaging.id + 1 if previous_packaging else 0 - domain = [ + domain_dimension = self._get_domain_packaging_needs_dimension() + domain_packaging_id = [ ("product_id", "=", product.id), ("id", ">=", next_packaging_id), - "|", - "|", - "|", - "|", - "|", - "|", - "|", - "|", - "|", - "|", - ("packaging_length", "=", 0), - ("packaging_length", "=", False), - ("width", "=", 0), - ("width", "=", False), - ("height", "=", 0), - ("height", "=", False), - ("max_weight", "=", 0), - ("max_weight", "=", False), - ("qty", "=", 0), - ("qty", "=", False), - ("barcode", "=", False), ] + domain = expression.AND([domain_packaging_id, domain_dimension]) return self.env["product.packaging"].search(domain, order="id", limit=1) def _response_for_set_packaging_dimension( diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index 52248ee2a1c..64c6fae5531 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -68,25 +68,26 @@ def test_scan_product_ask_for_dimension(self): response, self.picking, selected_move_line, self.product_a_packaging ) - # TODO : Have questions on how the lot information is commited by the frontend - # - # def test_scan_lot_ask_for_dimension(self): - # self.product_a.tracking = "none" - # self.assertTrue(self.product_a.packaging_ids) - # response = self.service.dispatch( - # "set_lot_confirmation_action", - # params={ - # "picking_id": self.picking.id, - # "barcode": self.product_a.barcode, - # }, - # ) - # self.data.picking(self.picking) - # selected_move_line = self.picking.move_line_ids.filtered( - # lambda l: l.product_id == self.product_a - # ) - # self._assert_response_set_dimension( - # response, self.picking, selected_move_line, self.product_a_packaging - # ) + def test_scan_lot_ask_for_dimension(self): + self.product_a.tracking = "none" + selected_move_line = self.picking.move_line_ids.filtered( + lambda l: l.product_id == self.product_a + ) + self.assertTrue(self.product_a.packaging_ids) + response = self.service.dispatch( + "set_lot_confirm_action", + params={ + "picking_id": self.picking.id, + "selected_line_id": selected_move_line.id, + }, + ) + self.data.picking(self.picking) + selected_move_line = self.picking.move_line_ids.filtered( + lambda l: l.product_id == self.product_a + ) + self._assert_response_set_dimension( + response, self.picking, selected_move_line, self.product_a_packaging + ) def test_set_packaging_dimension(self): selected_move_line = self.picking.move_line_ids.filtered( From af5796131d894b7d5eb66ea5a25747dedba59f73 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 7 Nov 2023 09:11:11 +0000 Subject: [PATCH 03/43] [UPD] Update shopfloor_reception_packaging_dimension.pot [BOT] post-merge updates --- .../README.rst | 88 ++++ .../__manifest__.py | 2 +- ...hopfloor_reception_packaging_dimension.pot | 51 +++ .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 427 ++++++++++++++++++ 5 files changed, 567 insertions(+), 1 deletion(-) create mode 100644 shopfloor_reception_packaging_dimension/README.rst create mode 100644 shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot create mode 100644 shopfloor_reception_packaging_dimension/static/description/icon.png create mode 100644 shopfloor_reception_packaging_dimension/static/description/index.html diff --git a/shopfloor_reception_packaging_dimension/README.rst b/shopfloor_reception_packaging_dimension/README.rst new file mode 100644 index 00000000000..07f6e6c1cc5 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/README.rst @@ -0,0 +1,88 @@ +======================================= +Shopfloor Reception Packaging Dimension +======================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:4d3c2af063d1415c5bc210b307d100dbda547800882cfc9074b28258676267dc + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github + :target: https://github.com/OCA/wms/tree/14.0/shopfloor_reception_packaging_dimension + :alt: OCA/wms +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_reception_packaging_dimension + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/wms&target_branch=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds an option to the reception scenario. +When activated. Before setting the quantity for the reception, +if there is product packaging related to the product received with +missing information, the user will be presented with a screen +(for each packaging) proposing to update the missing information. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Thierry Ducrest + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-TDu| image:: https://github.com/TDu.png?size=40px + :target: https://github.com/TDu + :alt: TDu + +Current `maintainer `__: + +|maintainer-TDu| + +This module is part of the `OCA/wms `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py index 08566851e0f..fc2bd47160e 100644 --- a/shopfloor_reception_packaging_dimension/__manifest__.py +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Shopfloor Reception Packaging Dimension", "summary": "Collect Packaging Dimension from the Reception scenario", - "version": "14.0.1.0.0", + "version": "14.0.1.1.0", "development_status": "Beta", "category": "Inventory", "website": "https://github.com/OCA/wms", diff --git a/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot b/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot new file mode 100644 index 00000000000..816d3285327 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * shopfloor_reception_packaging_dimension +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__display_name +msgid "Display Name" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__id +msgid "ID" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension +msgid "" +"If for the product being processed, its related packaging dimension are not " +"set, ask to fill them up." +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu____last_update +msgid "Last Modified on" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model,name:shopfloor_reception_packaging_dimension.model_shopfloor_menu +msgid "Menu displayed in the scanner application" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension_is_possible +msgid "Set Packaging Dimension Is Possible" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension +msgid "Set packaging dimension" +msgstr "" diff --git a/shopfloor_reception_packaging_dimension/static/description/icon.png b/shopfloor_reception_packaging_dimension/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dC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??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/shopfloor_reception_packaging_dimension/static/description/index.html b/shopfloor_reception_packaging_dimension/static/description/index.html new file mode 100644 index 00000000000..2a11932ca13 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/static/description/index.html @@ -0,0 +1,427 @@ + + + + + + +Shopfloor Reception Packaging Dimension + + + +
+

Shopfloor Reception Packaging Dimension

+ + +

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

+

This module adds an option to the reception scenario. +When activated. Before setting the quantity for the reception, +if there is product packaging related to the product received with +missing information, the user will be presented with a screen +(for each packaging) proposing to update the missing information.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

TDu

+

This module is part of the OCA/wms project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + From 861bb81324b8e77517963e0ed20b31aa2601976f Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 7 Nov 2023 13:10:05 +0000 Subject: [PATCH 04/43] Added translation using Weblate (Italian) Translated using Weblate (Italian) Currently translated at 100.0% (7 of 7 strings) Translation: wms-14.0/wms-14.0-shopfloor_reception_packaging_dimension Translate-URL: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_reception_packaging_dimension/it/ --- .../i18n/it.po | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 shopfloor_reception_packaging_dimension/i18n/it.po diff --git a/shopfloor_reception_packaging_dimension/i18n/it.po b/shopfloor_reception_packaging_dimension/i18n/it.po new file mode 100644 index 00000000000..2b37f8306b7 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/i18n/it.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * shopfloor_reception_packaging_dimension +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-11-12 17:37+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__id +msgid "ID" +msgstr "ID" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension +msgid "" +"If for the product being processed, its related packaging dimension are not " +"set, ask to fill them up." +msgstr "" +"Se per il prodotto che deve essere lavorato, non è impostata la dimensione " +"dell'imballo, chiede di compilarla." + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model,name:shopfloor_reception_packaging_dimension.model_shopfloor_menu +msgid "Menu displayed in the scanner application" +msgstr "Menu visualizzato nell'applicazione di scansione" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension_is_possible +msgid "Set Packaging Dimension Is Possible" +msgstr "È possibile impostare la dimensione dell'imballo" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension +msgid "Set packaging dimension" +msgstr "Imposta dimensione imballo" From a97cbb085d8250278a58f4f35f2ae74057ac1d9b Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Wed, 22 Nov 2023 10:47:11 +0100 Subject: [PATCH 05/43] sf_reception_packaging_dimension: fix test confirmation --- .../tests/test_set_package_dimension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index 64c6fae5531..468e1bbc935 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -153,7 +153,7 @@ def test_set_multiple_packaging_dimension(self): data={ "picking": self.data.picking(self.picking), "selected_move_line": self.data.move_lines(line), - "confirmation_required": False, + "confirmation_required": None, }, message=self.msg_store.packaging_dimension_updated( self.product_c_packaging_2 From ddbcfed4380fd73e2d65cc2bbb49b01944e8290c Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 22 Nov 2023 11:03:21 +0000 Subject: [PATCH 06/43] [BOT] post-merge updates --- shopfloor_reception_packaging_dimension/README.rst | 2 +- shopfloor_reception_packaging_dimension/__manifest__.py | 2 +- .../static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/README.rst b/shopfloor_reception_packaging_dimension/README.rst index 07f6e6c1cc5..fa2e8d0c434 100644 --- a/shopfloor_reception_packaging_dimension/README.rst +++ b/shopfloor_reception_packaging_dimension/README.rst @@ -7,7 +7,7 @@ Shopfloor Reception Packaging Dimension !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:4d3c2af063d1415c5bc210b307d100dbda547800882cfc9074b28258676267dc + !! source digest: sha256:a9807c9f273dac265c97d18b5e70280442942cb5b6e019e779be93784cd4765e !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py index fc2bd47160e..2430e9a749c 100644 --- a/shopfloor_reception_packaging_dimension/__manifest__.py +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Shopfloor Reception Packaging Dimension", "summary": "Collect Packaging Dimension from the Reception scenario", - "version": "14.0.1.1.0", + "version": "14.0.1.2.0", "development_status": "Beta", "category": "Inventory", "website": "https://github.com/OCA/wms", diff --git a/shopfloor_reception_packaging_dimension/static/description/index.html b/shopfloor_reception_packaging_dimension/static/description/index.html index 2a11932ca13..c3d3760a4f0 100644 --- a/shopfloor_reception_packaging_dimension/static/description/index.html +++ b/shopfloor_reception_packaging_dimension/static/description/index.html @@ -367,7 +367,7 @@

Shopfloor Reception Packaging Dimension

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:4d3c2af063d1415c5bc210b307d100dbda547800882cfc9074b28258676267dc +!! source digest: sha256:a9807c9f273dac265c97d18b5e70280442942cb5b6e019e779be93784cd4765e !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

This module adds an option to the reception scenario. From 85169933989ac4e4157847a938a2e6cfb11469d9 Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Mon, 4 Aug 2025 21:05:50 +0200 Subject: [PATCH 07/43] [IMP] shopfloor_reception_packaging_dimension: pre-commit auto fixes --- .../README.rst | 34 +++++++++---------- .../__manifest__.py | 2 +- .../pyproject.toml | 3 ++ .../readme/CONTRIBUTORS.md | 1 + .../readme/CONTRIBUTORS.rst | 1 - .../readme/DESCRIPTION.md | 5 +++ .../readme/DESCRIPTION.rst | 5 --- .../static/description/index.html | 30 ++++++++-------- .../views/shopfloor_menu.xml | 14 ++++---- 9 files changed, 49 insertions(+), 46 deletions(-) create mode 100644 shopfloor_reception_packaging_dimension/pyproject.toml create mode 100644 shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.md delete mode 100644 shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.rst create mode 100644 shopfloor_reception_packaging_dimension/readme/DESCRIPTION.md delete mode 100644 shopfloor_reception_packaging_dimension/readme/DESCRIPTION.rst diff --git a/shopfloor_reception_packaging_dimension/README.rst b/shopfloor_reception_packaging_dimension/README.rst index fa2e8d0c434..bbc869e7de3 100644 --- a/shopfloor_reception_packaging_dimension/README.rst +++ b/shopfloor_reception_packaging_dimension/README.rst @@ -16,23 +16,23 @@ Shopfloor Reception Packaging Dimension .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github - :target: https://github.com/OCA/wms/tree/14.0/shopfloor_reception_packaging_dimension - :alt: OCA/wms +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--shopfloor-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-shopfloor/tree/18.0/shopfloor_reception_packaging_dimension + :alt: OCA/stock-logistics-shopfloor .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_reception_packaging_dimension + :target: https://translation.odoo-community.org/projects/stock-logistics-shopfloor-18-0/stock-logistics-shopfloor-18-0-shopfloor_reception_packaging_dimension :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/wms&target_branch=14.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-shopfloor&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module adds an option to the reception scenario. -When activated. Before setting the quantity for the reception, -if there is product packaging related to the product received with -missing information, the user will be presented with a screen -(for each packaging) proposing to update the missing information. +This module adds an option to the reception scenario. When activated. +Before setting the quantity for the reception, if there is product +packaging related to the product received with missing information, the +user will be presented with a screen (for each packaging) proposing to +update the missing information. **Table of contents** @@ -42,10 +42,10 @@ missing information, the user will be presented with a screen Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -53,17 +53,17 @@ Credits ======= Authors -~~~~~~~ +------- * Camptocamp Contributors -~~~~~~~~~~~~ +------------ -* Thierry Ducrest +- Thierry Ducrest Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -83,6 +83,6 @@ Current `maintainer `__: |maintainer-TDu| -This module is part of the `OCA/wms `_ project on GitHub. +This module is part of the `OCA/stock-logistics-shopfloor `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py index 2430e9a749c..f1becba8eb6 100644 --- a/shopfloor_reception_packaging_dimension/__manifest__.py +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -4,7 +4,7 @@ "version": "14.0.1.2.0", "development_status": "Beta", "category": "Inventory", - "website": "https://github.com/OCA/wms", + "website": "https://github.com/OCA/stock-logistics-shopfloor", "author": "Camptocamp, Odoo Community Association (OCA)", "maintainers": ["TDu"], "license": "AGPL-3", diff --git a/shopfloor_reception_packaging_dimension/pyproject.toml b/shopfloor_reception_packaging_dimension/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.md b/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..62ceaf42fc5 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Thierry Ducrest \<\> diff --git a/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.rst b/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.rst deleted file mode 100644 index 0dd376faecb..00000000000 --- a/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1 +0,0 @@ -* Thierry Ducrest diff --git a/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.md b/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.md new file mode 100644 index 00000000000..7486f8c5859 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.md @@ -0,0 +1,5 @@ +This module adds an option to the reception scenario. When activated. +Before setting the quantity for the reception, if there is product +packaging related to the product received with missing information, the +user will be presented with a screen (for each packaging) proposing to +update the missing information. diff --git a/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.rst b/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.rst deleted file mode 100644 index fe5faf19ae4..00000000000 --- a/shopfloor_reception_packaging_dimension/readme/DESCRIPTION.rst +++ /dev/null @@ -1,5 +0,0 @@ -This module adds an option to the reception scenario. -When activated. Before setting the quantity for the reception, -if there is product packaging related to the product received with -missing information, the user will be presented with a screen -(for each packaging) proposing to update the missing information. diff --git a/shopfloor_reception_packaging_dimension/static/description/index.html b/shopfloor_reception_packaging_dimension/static/description/index.html index c3d3760a4f0..d5eda6c791c 100644 --- a/shopfloor_reception_packaging_dimension/static/description/index.html +++ b/shopfloor_reception_packaging_dimension/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,12 +369,12 @@

Shopfloor Reception Packaging Dimension

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:a9807c9f273dac265c97d18b5e70280442942cb5b6e019e779be93784cd4765e !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

-

This module adds an option to the reception scenario. -When activated. Before setting the quantity for the reception, -if there is product packaging related to the product received with -missing information, the user will be presented with a screen -(for each packaging) proposing to update the missing information.

+

Beta License: AGPL-3 OCA/stock-logistics-shopfloor Translate me on Weblate Try me on Runboat

+

This module adds an option to the reception scenario. When activated. +Before setting the quantity for the reception, if there is product +packaging related to the product received with missing information, the +user will be presented with a screen (for each packaging) proposing to +update the missing information.

Table of contents

    @@ -389,10 +389,10 @@

    Shopfloor Reception Packaging Dimension

Bug Tracker

-

Bugs are tracked on GitHub Issues. +

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -412,13 +412,15 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

TDu

-

This module is part of the OCA/wms project on GitHub.

+

This module is part of the OCA/stock-logistics-shopfloor project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml b/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml index 9c0f6502406..e055bd11ad0 100644 --- a/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml +++ b/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml @@ -4,17 +4,15 @@ shopfloor.menu - - - + - - - - - + + + + From 044a82367d8f8350f24cd23f458e7dcfa59a841b Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Tue, 5 Aug 2025 18:02:12 +0200 Subject: [PATCH 08/43] [MIG] shopfloor_reception_packaging_dimension: Migration to 18.0 --- .../__manifest__.py | 4 +++- .../hooks.py | 8 ++------ .../services/reception.py | 8 ++++---- .../tests/test_set_package_dimension.py | 17 +++++++++-------- .../views/shopfloor_menu.xml | 3 +-- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py index f1becba8eb6..e1a7b9a0061 100644 --- a/shopfloor_reception_packaging_dimension/__manifest__.py +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -1,7 +1,9 @@ +# Copyright 2023 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) { "name": "Shopfloor Reception Packaging Dimension", "summary": "Collect Packaging Dimension from the Reception scenario", - "version": "14.0.1.2.0", + "version": "18.0.1.0.0", "development_status": "Beta", "category": "Inventory", "website": "https://github.com/OCA/stock-logistics-shopfloor", diff --git a/shopfloor_reception_packaging_dimension/hooks.py b/shopfloor_reception_packaging_dimension/hooks.py index 00c46969c7f..eca59a9c6c0 100644 --- a/shopfloor_reception_packaging_dimension/hooks.py +++ b/shopfloor_reception_packaging_dimension/hooks.py @@ -4,8 +4,6 @@ import json import logging -from odoo import SUPERUSER_ID, api - from odoo.addons.shopfloor_base.utils import purge_endpoints, register_new_services from .services.reception import Reception as Service @@ -13,9 +11,8 @@ _logger = logging.getLogger(__file__) -def post_init_hook(cr, registry): +def post_init_hook(env): _logger.info("Add set packaging dimension option on reception scenario") - env = api.Environment(cr, SUPERUSER_ID, {}) scenario = env.ref("shopfloor_reception.scenario_reception") options = scenario.options options.update({"set_packaging_dimension": True}) @@ -28,9 +25,8 @@ def post_init_hook(cr, registry): register_new_services(env, Service) -def uninstall_hook(cr, registry): +def uninstall_hook(env): _logger.info("Remove set packaging dimension option on reception scenario") - env = api.Environment(cr, SUPERUSER_ID, {}) scenario = env.ref("shopfloor_reception.scenario_reception") options = scenario.options if "set_packaging_dimension" in options.keys(): diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index b87458df11b..189b5b77677 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -32,8 +32,8 @@ def _get_domain_packaging_needs_dimension(self): [("width", "=", False)], [("height", "=", 0)], [("height", "=", False)], - [("max_weight", "=", 0)], - [("max_weight", "=", False)], + [("weight", "=", 0)], + [("weight", "=", False)], [("qty", "=", 0)], [("qty", "=", False)], [("barcode", "=", False)], @@ -99,7 +99,7 @@ def set_packaging_dimension( return self._before_state__set_quantity(picking, selected_line, message=message) def _check_dimension_to_update(self, dimensions): - """Return True if there is any dimension that needs to be updated on the packaging.""" + """Return True if any dimension on the packaging needs to be updated""" return any([value is not None for key, value in dimensions.items()]) def _get_dimension_fields_conversion_map(self): @@ -144,7 +144,7 @@ def set_packaging_dimension(self): "type": "float", "nullable": True, }, - "max_weight": { + "weight": { "coerce": to_float, "required": False, "type": "float", diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index 468e1bbc935..8caf483567c 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -4,6 +4,7 @@ from odoo.addons.shopfloor_reception.tests.common import CommonCase +# pylint: disable=W8110 class TestSetPackDimension(CommonCase): @classmethod def setUpClassBaseData(cls): @@ -62,7 +63,7 @@ def test_scan_product_ask_for_dimension(self): ) self.data.picking(self.picking) selected_move_line = self.picking.move_line_ids.filtered( - lambda l: l.product_id == self.product_a + lambda li: li.product_id == self.product_a ) self._assert_response_set_dimension( response, self.picking, selected_move_line, self.product_a_packaging @@ -71,7 +72,7 @@ def test_scan_product_ask_for_dimension(self): def test_scan_lot_ask_for_dimension(self): self.product_a.tracking = "none" selected_move_line = self.picking.move_line_ids.filtered( - lambda l: l.product_id == self.product_a + lambda li: li.product_id == self.product_a ) self.assertTrue(self.product_a.packaging_ids) response = self.service.dispatch( @@ -83,7 +84,7 @@ def test_scan_lot_ask_for_dimension(self): ) self.data.picking(self.picking) selected_move_line = self.picking.move_line_ids.filtered( - lambda l: l.product_id == self.product_a + lambda li: li.product_id == self.product_a ) self._assert_response_set_dimension( response, self.picking, selected_move_line, self.product_a_packaging @@ -91,7 +92,7 @@ def test_scan_lot_ask_for_dimension(self): def test_set_packaging_dimension(self): selected_move_line = self.picking.move_line_ids.filtered( - lambda l: l.product_id == self.product_a + lambda li: li.product_id == self.product_a ) self.service.dispatch( "set_packaging_dimension", @@ -110,10 +111,10 @@ def test_set_packaging_dimension(self): def test_set_multiple_packaging_dimension(self): line = self.picking.move_line_ids.filtered( - lambda l: l.product_id == self.product_c + lambda li: li.product_id == self.product_c ) # Set the weight but other dimension are required - self.product_c_packaging_2.max_weight = 200 + self.product_c_packaging_2.weight = 200 response = self.service.dispatch( "set_packaging_dimension", params={ @@ -142,11 +143,11 @@ def test_set_multiple_packaging_dimension(self): "selected_line_id": line.id, "packaging_id": self.product_c_packaging_2.id, "height": 200, - "max_weight": 1000, + "weight": 1000, }, ) self.assertEqual(self.product_c_packaging_2.height, 200) - self.assertEqual(self.product_c_packaging_2.max_weight, 1000) + self.assertEqual(self.product_c_packaging_2.weight, 1000) self.assert_response( response, next_state="set_quantity", diff --git a/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml b/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml index e055bd11ad0..fe4c6ec92f5 100644 --- a/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml +++ b/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml @@ -7,9 +7,8 @@ - From 724d0b0eac9b81afe25a865b12d7d798a48136dd Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Tue, 19 Aug 2025 11:00:47 +0200 Subject: [PATCH 09/43] shopfloor_reception_packaging_dimension: fix missing response validator --- .../services/reception.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index 189b5b77677..e5b4d1e6a3f 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -195,3 +195,11 @@ def _schema_set_packaging_dimension(self): "schema": self.schemas_detail.packaging_detail(), }, } + + def _set_packaging_dimension_next_states(self): + return {"set_packaging_dimension", "set_quantity"} + + def set_packaging_dimension(self): + return self._response_schema( + next_states=self._set_packaging_dimension_next_states() + ) From 172b6816cb30f0678f8ae41bb20459f2095bcc2d Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Tue, 19 Aug 2025 11:04:58 +0200 Subject: [PATCH 10/43] shopfloor_reception_packaging_dimension: fix init of class var Such vars should be initialized when the component gets initialized. --- shopfloor_reception_packaging_dimension/services/reception.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index e5b4d1e6a3f..16a761325b5 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -11,7 +11,9 @@ class Reception(Component): _inherit = "shopfloor.reception" - packaging_update_done = False + def __init__(self, work_context): + super().__init__(work_context) + self.packaging_update_done = False def _before_state__set_quantity(self, picking, line, message=None): """Show the packaging dimension screen before the set quantity screen.""" From 37b24252e497cc64118bf8fef875d1c09284b7db Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Tue, 19 Aug 2025 11:06:08 +0200 Subject: [PATCH 11/43] shopfloor_reception_packaging_dimension: fix typo --- shopfloor_reception_packaging_dimension/services/reception.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index 16a761325b5..f2410b8b6e3 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -72,7 +72,7 @@ def set_packaging_dimension( """Set the dimension on a product packaging. If the user cancel the dimension update we still propose the next - possible packgaging. + possible packaging. Transitions: - set_packaging_dimension: if more packaging needs dimension From b2568af10cd4961c11e8c478cf77c5248457dbd5 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Tue, 19 Aug 2025 11:57:55 +0200 Subject: [PATCH 12/43] shopfloor_reception_packaging_dimension: add hooks for packaging data --- .../services/reception.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index f2410b8b6e3..42d7bf1712c 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -61,11 +61,16 @@ def _response_for_set_packaging_dimension( data={ "picking": self.data.picking(picking), "selected_move_line": self.data.move_line(line), - "packaging": self.data_detail.packaging_detail(packaging), + "packaging": self._set_packaging_dimension_data_for_packaging( + packaging + ), }, message=message, ) + def _set_packaging_dimension_data_for_packaging(self, packaging): + return self.data_detail.packaging_detail(packaging) + def set_packaging_dimension( self, picking_id, selected_line_id, packaging_id, cancel=False, **kwargs ): @@ -192,10 +197,13 @@ def _schema_set_packaging_dimension(self): return { "picking": {"type": "dict", "schema": self.schemas.picking()}, "selected_move_line": {"type": "dict", "schema": self.schemas.move_line()}, - "packaging": { - "type": "dict", - "schema": self.schemas_detail.packaging_detail(), - }, + "packaging": self._schema_packaging(), + } + + def _schema_packaging(self): + return { + "type": "dict", + "schema": self.schemas_detail.packaging_detail(), } def _set_packaging_dimension_next_states(self): From a58e4c059e8bb1879f6adcef3a08764e5eaae524 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 19 Aug 2025 14:54:07 +0000 Subject: [PATCH 13/43] [UPD] Update shopfloor_reception_packaging_dimension.pot --- .../shopfloor_reception_packaging_dimension.pot | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot b/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot index 816d3285327..f8713c8f882 100644 --- a/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot +++ b/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,16 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: shopfloor_reception_packaging_dimension -#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__display_name -msgid "Display Name" -msgstr "" - -#. module: shopfloor_reception_packaging_dimension -#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__id -msgid "ID" -msgstr "" - #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension msgid "" @@ -30,11 +20,6 @@ msgid "" "set, ask to fill them up." msgstr "" -#. module: shopfloor_reception_packaging_dimension -#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu____last_update -msgid "Last Modified on" -msgstr "" - #. module: shopfloor_reception_packaging_dimension #: model:ir.model,name:shopfloor_reception_packaging_dimension.model_shopfloor_menu msgid "Menu displayed in the scanner application" From b61bae68c3cf6af8de2145455603d4bcfb9dd10f Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 19 Aug 2025 15:03:38 +0000 Subject: [PATCH 14/43] [BOT] post-merge updates --- .../README.rst | 10 ++++--- .../static/description/index.html | 26 ++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/README.rst b/shopfloor_reception_packaging_dimension/README.rst index bbc869e7de3..5aef7117948 100644 --- a/shopfloor_reception_packaging_dimension/README.rst +++ b/shopfloor_reception_packaging_dimension/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ======================================= Shopfloor Reception Packaging Dimension ======================================= @@ -7,13 +11,13 @@ Shopfloor Reception Packaging Dimension !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:a9807c9f273dac265c97d18b5e70280442942cb5b6e019e779be93784cd4765e + !! source digest: sha256:ecb5b68abcce88c2bda92a033952d123eb405092152e95a1a358b91555b3dc12 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--shopfloor-lightgray.png?logo=github @@ -60,7 +64,7 @@ Authors Contributors ------------ -- Thierry Ducrest +- Thierry Ducrest Maintainers ----------- diff --git a/shopfloor_reception_packaging_dimension/static/description/index.html b/shopfloor_reception_packaging_dimension/static/description/index.html index d5eda6c791c..c11e3bb49b2 100644 --- a/shopfloor_reception_packaging_dimension/static/description/index.html +++ b/shopfloor_reception_packaging_dimension/static/description/index.html @@ -3,7 +3,7 @@ -Shopfloor Reception Packaging Dimension +README.rst -
-

Shopfloor Reception Packaging Dimension

+
+ + +Odoo Community Association + +
+

Shopfloor Reception Packaging Dimension

-

Beta License: AGPL-3 OCA/stock-logistics-shopfloor Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/stock-logistics-shopfloor Translate me on Weblate Try me on Runboat

This module adds an option to the reception scenario. When activated. Before setting the quantity for the reception, if there is product packaging related to the product received with missing information, the @@ -388,7 +393,7 @@

Shopfloor Reception Packaging Dimension

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -396,21 +401,21 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

+
From 959bfad20d70dbb0417ea58e2de64570e77aa08c Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Wed, 20 Aug 2025 19:00:43 +0200 Subject: [PATCH 15/43] [IMP] shopfloor_reception_packaging_dimension: collect only needed dimensions --- .../__manifest__.py | 7 +- .../models/__init__.py | 1 + .../models/product_packaging_level.py | 33 +++++++++ .../services/reception.py | 35 ++++++--- .../tests/test_set_package_dimension.py | 71 +++++++++++++++++++ .../views/product_packaging_level.xml | 23 ++++++ 6 files changed, 157 insertions(+), 13 deletions(-) create mode 100644 shopfloor_reception_packaging_dimension/models/product_packaging_level.py create mode 100644 shopfloor_reception_packaging_dimension/views/product_packaging_level.xml diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py index e1a7b9a0061..333ec5e48db 100644 --- a/shopfloor_reception_packaging_dimension/__manifest__.py +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -11,8 +11,11 @@ "maintainers": ["TDu"], "license": "AGPL-3", "installable": True, - "depends": ["shopfloor_reception"], - "data": ["views/shopfloor_menu.xml"], + "depends": ["shopfloor_reception", "product_packaging_level"], + "data": [ + "views/product_packaging_level.xml", + "views/shopfloor_menu.xml", + ], "post_init_hook": "post_init_hook", "uninstall_hook": "uninstall_hook", } diff --git a/shopfloor_reception_packaging_dimension/models/__init__.py b/shopfloor_reception_packaging_dimension/models/__init__.py index 8bd3d5195ca..0f96d1da6bd 100644 --- a/shopfloor_reception_packaging_dimension/models/__init__.py +++ b/shopfloor_reception_packaging_dimension/models/__init__.py @@ -1 +1,2 @@ +from . import product_packaging_level from . import shopfloor_menu diff --git a/shopfloor_reception_packaging_dimension/models/product_packaging_level.py b/shopfloor_reception_packaging_dimension/models/product_packaging_level.py new file mode 100644 index 00000000000..f766f5be621 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/models/product_packaging_level.py @@ -0,0 +1,33 @@ +# Copyright 2025 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) +from odoo import fields, models + +HELP_TEXT = ( + "When marked, shopfloor will require to set this dimension during " + "reception if undefined on the packaging" +) + + +class ProductPackagingLevel(models.Model): + _inherit = "product.packaging.level" + + shopfloor_collect_length = fields.Boolean( + "Collect length", + default=True, + help=HELP_TEXT, + ) + shopfloor_collect_width = fields.Boolean( + "Collect width", + default=True, + help=HELP_TEXT, + ) + shopfloor_collect_height = fields.Boolean( + "Collect height", + default=True, + help=HELP_TEXT, + ) + shopfloor_collect_weight = fields.Boolean( + "Collect weight", + default=True, + help=HELP_TEXT, + ) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index 42d7bf1712c..695c6d0b8d8 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -28,16 +28,30 @@ def _before_state__set_quantity(self, picking, line, message=None): def _get_domain_packaging_needs_dimension(self): return expression.OR( [ - [("packaging_length", "=", 0)], - [("packaging_length", "=", False)], - [("width", "=", 0)], - [("width", "=", False)], - [("height", "=", 0)], - [("height", "=", False)], - [("weight", "=", 0)], - [("weight", "=", False)], - [("qty", "=", 0)], - [("qty", "=", False)], + [ + ("packaging_level_id.shopfloor_collect_length", "=", True), + "|", + ("packaging_length", "=", 0), + ("packaging_length", "=", False), + ], + [ + ("packaging_level_id.shopfloor_collect_width", "=", True), + "|", + ("width", "=", 0), + ("width", "=", False), + ], + [ + ("packaging_level_id.shopfloor_collect_height", "=", True), + "|", + ("height", "=", 0), + ("height", "=", False), + ], + [ + ("packaging_level_id.shopfloor_collect_weight", "=", True), + "|", + ("weight", "=", 0), + ("weight", "=", False), + ], [("barcode", "=", False)], ] ) @@ -93,7 +107,6 @@ def set_packaging_dimension( elif not cancel and self._check_dimension_to_update(kwargs): self._update_packaging_dimension(packaging, kwargs) message = self.msg_store.packaging_dimension_updated(packaging) - if packaging: next_packaging = self._get_next_packaging_to_set_dimension( selected_line.product_id, packaging diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index 8caf483567c..d797f6b4c03 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -14,6 +14,17 @@ def setUpClassBaseData(cls): cls.picking = cls._create_picking( lines=[(cls.product_a, 10), (cls.product_b, 10), (cls.product_c, 10)] ) + cls.default_packaging_level = cls.env[ + "product.packaging" + ].default_packaging_level_id() + cls.default_packaging_level.sudo().write( + { + "shopfloor_collect_length": True, + "shopfloor_collect_width": True, + "shopfloor_collect_height": True, + "shopfloor_collect_weight": True, + } + ) # Picking has 3 products # Product A with one packaging # Product B with no packaging @@ -69,6 +80,66 @@ def test_scan_product_ask_for_dimension(self): response, self.picking, selected_move_line, self.product_a_packaging ) + def test_scan_product_dimension_already_defined(self): + self.product_a.tracking = "none" + self.product_a_packaging.write( + { + "packaging_length": 10.0, + "width": 5.0, + "height": 2.0, + "weight": 1.5, + } + ) + response = self.service.dispatch( + "scan_line", + params={ + "picking_id": self.picking.id, + "barcode": self.product_a.barcode, + }, + ) + selected_move_line = self.picking.move_line_ids.filtered( + lambda li: li.product_id == self.product_a + ) + self.assert_response( + response, + next_state="set_quantity", + data={ + "confirmation_required": None, + "picking": self.data.picking(self.picking), + "selected_move_line": [self.data.move_line(selected_move_line)], + }, + ) + + def test_scan_product_dimension_not_needed(self): + self.product_a.tracking = "none" + self.default_packaging_level.sudo().write( + { + "shopfloor_collect_length": False, + "shopfloor_collect_width": False, + "shopfloor_collect_height": False, + "shopfloor_collect_weight": False, + } + ) + response = self.service.dispatch( + "scan_line", + params={ + "picking_id": self.picking.id, + "barcode": self.product_a.barcode, + }, + ) + selected_move_line = self.picking.move_line_ids.filtered( + lambda li: li.product_id == self.product_a + ) + self.assert_response( + response, + next_state="set_quantity", + data={ + "confirmation_required": None, + "picking": self.data.picking(self.picking), + "selected_move_line": [self.data.move_line(selected_move_line)], + }, + ) + def test_scan_lot_ask_for_dimension(self): self.product_a.tracking = "none" selected_move_line = self.picking.move_line_ids.filtered( diff --git a/shopfloor_reception_packaging_dimension/views/product_packaging_level.xml b/shopfloor_reception_packaging_dimension/views/product_packaging_level.xml new file mode 100644 index 00000000000..93950b5f655 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/views/product_packaging_level.xml @@ -0,0 +1,23 @@ + + + + product.packaging.level.form + product.packaging.level + + + + + + + + + + + + + + + From 74e1a949043f1415765c1cb2e1a8f9dec77202c2 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 29 Aug 2025 12:52:43 +0000 Subject: [PATCH 16/43] [UPD] Update shopfloor_reception_packaging_dimension.pot --- ...hopfloor_reception_packaging_dimension.pot | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot b/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot index f8713c8f882..bedc200b543 100644 --- a/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot +++ b/shopfloor_reception_packaging_dimension/i18n/shopfloor_reception_packaging_dimension.pot @@ -13,6 +13,26 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_height +msgid "Collect height" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_length +msgid "Collect length" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_weight +msgid "Collect weight" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_width +msgid "Collect width" +msgstr "" + #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension msgid "" @@ -20,6 +40,11 @@ msgid "" "set, ask to fill them up." msgstr "" +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model,name:shopfloor_reception_packaging_dimension.model_product_packaging_level +msgid "Level management for product.packaging" +msgstr "" + #. module: shopfloor_reception_packaging_dimension #: model:ir.model,name:shopfloor_reception_packaging_dimension.model_shopfloor_menu msgid "Menu displayed in the scanner application" @@ -34,3 +59,18 @@ msgstr "" #: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension msgid "Set packaging dimension" msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model_terms:ir.ui.view,arch_db:shopfloor_reception_packaging_dimension.view_product_packaging_level_form +msgid "Shopfloor" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_height +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_length +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_weight +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_width +msgid "" +"When marked, shopfloor will require to set this dimension during reception " +"if undefined on the packaging" +msgstr "" From 5bf699c7fede6de616d33da24869cc462b3ce1b0 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 29 Aug 2025 13:02:46 +0000 Subject: [PATCH 17/43] [BOT] post-merge updates --- shopfloor_reception_packaging_dimension/README.rst | 2 +- shopfloor_reception_packaging_dimension/__manifest__.py | 2 +- .../static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/README.rst b/shopfloor_reception_packaging_dimension/README.rst index 5aef7117948..76aa14b5212 100644 --- a/shopfloor_reception_packaging_dimension/README.rst +++ b/shopfloor_reception_packaging_dimension/README.rst @@ -11,7 +11,7 @@ Shopfloor Reception Packaging Dimension !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:ecb5b68abcce88c2bda92a033952d123eb405092152e95a1a358b91555b3dc12 + !! source digest: sha256:9eeb40e76db899eedaf247b7f44f8ccb3222db15482d93d6f80b64e27fdfd2a6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py index 333ec5e48db..7e3f8b99edc 100644 --- a/shopfloor_reception_packaging_dimension/__manifest__.py +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Shopfloor Reception Packaging Dimension", "summary": "Collect Packaging Dimension from the Reception scenario", - "version": "18.0.1.0.0", + "version": "18.0.1.1.0", "development_status": "Beta", "category": "Inventory", "website": "https://github.com/OCA/stock-logistics-shopfloor", diff --git a/shopfloor_reception_packaging_dimension/static/description/index.html b/shopfloor_reception_packaging_dimension/static/description/index.html index c11e3bb49b2..fd1a3a9de72 100644 --- a/shopfloor_reception_packaging_dimension/static/description/index.html +++ b/shopfloor_reception_packaging_dimension/static/description/index.html @@ -372,7 +372,7 @@

Shopfloor Reception Packaging Dimension

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:ecb5b68abcce88c2bda92a033952d123eb405092152e95a1a358b91555b3dc12 +!! source digest: sha256:9eeb40e76db899eedaf247b7f44f8ccb3222db15482d93d6f80b64e27fdfd2a6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/stock-logistics-shopfloor Translate me on Weblate Try me on Runboat

This module adds an option to the reception scenario. When activated. From b05eec09dd74c0696068d97e73592eba3d691094 Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 29 Aug 2025 13:02:54 +0000 Subject: [PATCH 18/43] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-shopfloor-18.0/stock-logistics-shopfloor-18.0-shopfloor_reception_packaging_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-shopfloor-18-0/stock-logistics-shopfloor-18-0-shopfloor_reception_packaging_dimension/ --- .../i18n/it.po | 52 +++++++++++++++---- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/i18n/it.po b/shopfloor_reception_packaging_dimension/i18n/it.po index 2b37f8306b7..ab90ae7bdbf 100644 --- a/shopfloor_reception_packaging_dimension/i18n/it.po +++ b/shopfloor_reception_packaging_dimension/i18n/it.po @@ -17,14 +17,24 @@ msgstr "" "X-Generator: Weblate 4.17\n" #. module: shopfloor_reception_packaging_dimension -#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__display_name -msgid "Display Name" -msgstr "Nome visualizzato" +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_height +msgid "Collect height" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_length +msgid "Collect length" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_weight +msgid "Collect weight" +msgstr "" #. module: shopfloor_reception_packaging_dimension -#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__id -msgid "ID" -msgstr "ID" +#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_width +msgid "Collect width" +msgstr "" #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension @@ -36,9 +46,9 @@ msgstr "" "dell'imballo, chiede di compilarla." #. module: shopfloor_reception_packaging_dimension -#: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu____last_update -msgid "Last Modified on" -msgstr "Ultima modifica il" +#: model:ir.model,name:shopfloor_reception_packaging_dimension.model_product_packaging_level +msgid "Level management for product.packaging" +msgstr "" #. module: shopfloor_reception_packaging_dimension #: model:ir.model,name:shopfloor_reception_packaging_dimension.model_shopfloor_menu @@ -54,3 +64,27 @@ msgstr "È possibile impostare la dimensione dell'imballo" #: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension msgid "Set packaging dimension" msgstr "Imposta dimensione imballo" + +#. module: shopfloor_reception_packaging_dimension +#: model_terms:ir.ui.view,arch_db:shopfloor_reception_packaging_dimension.view_product_packaging_level_form +msgid "Shopfloor" +msgstr "" + +#. module: shopfloor_reception_packaging_dimension +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_height +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_length +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_weight +#: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_width +msgid "" +"When marked, shopfloor will require to set this dimension during reception " +"if undefined on the packaging" +msgstr "" + +#~ msgid "Display Name" +#~ msgstr "Nome visualizzato" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" From 2a69118acdb05a064103165f84ccf6499ade0658 Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 1 Sep 2025 07:28:50 +0000 Subject: [PATCH 19/43] Translated using Weblate (Italian) Currently translated at 100.0% (11 of 11 strings) Translation: stock-logistics-shopfloor-18.0/stock-logistics-shopfloor-18.0-shopfloor_reception_packaging_dimension Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-shopfloor-18-0/stock-logistics-shopfloor-18-0-shopfloor_reception_packaging_dimension/it/ --- .../i18n/it.po | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/i18n/it.po b/shopfloor_reception_packaging_dimension/i18n/it.po index ab90ae7bdbf..2ba3659a928 100644 --- a/shopfloor_reception_packaging_dimension/i18n/it.po +++ b/shopfloor_reception_packaging_dimension/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-11-12 17:37+0000\n" +"PO-Revision-Date: 2025-09-01 09:42+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,27 +14,27 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.17\n" +"X-Generator: Weblate 5.10.4\n" #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_height msgid "Collect height" -msgstr "" +msgstr "Raccogli altezza" #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_length msgid "Collect length" -msgstr "" +msgstr "Raccogli lunghezza" #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_weight msgid "Collect weight" -msgstr "" +msgstr "Raccogli peso" #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,field_description:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_width msgid "Collect width" -msgstr "" +msgstr "Raccogli larghezza" #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_shopfloor_menu__set_packaging_dimension @@ -48,7 +48,7 @@ msgstr "" #. module: shopfloor_reception_packaging_dimension #: model:ir.model,name:shopfloor_reception_packaging_dimension.model_product_packaging_level msgid "Level management for product.packaging" -msgstr "" +msgstr "Gestione livello per product.packaging" #. module: shopfloor_reception_packaging_dimension #: model:ir.model,name:shopfloor_reception_packaging_dimension.model_shopfloor_menu @@ -68,7 +68,7 @@ msgstr "Imposta dimensione imballo" #. module: shopfloor_reception_packaging_dimension #: model_terms:ir.ui.view,arch_db:shopfloor_reception_packaging_dimension.view_product_packaging_level_form msgid "Shopfloor" -msgstr "" +msgstr "Reparto" #. module: shopfloor_reception_packaging_dimension #: model:ir.model.fields,help:shopfloor_reception_packaging_dimension.field_product_packaging_level__shopfloor_collect_height @@ -79,6 +79,8 @@ msgid "" "When marked, shopfloor will require to set this dimension during reception " "if undefined on the packaging" msgstr "" +"Una volta contrassegnata, il reparto dovrà impostare questa dimensione " +"durante la ricezione se non definita sulla confezione" #~ msgid "Display Name" #~ msgstr "Nome visualizzato" From b46fcdc58e11380dcfd4962283124ce3bd67200b Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 5 Sep 2025 13:29:03 +0200 Subject: [PATCH 20/43] [IMP] shopfloor_reception_packaging_dimension: pre-commit autofixes --- .../README.rst | 22 ++++++-------- .../__manifest__.py | 2 +- .../static/description/index.html | 30 ++++++++----------- 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/README.rst b/shopfloor_reception_packaging_dimension/README.rst index 76aa14b5212..5d22e1c29d6 100644 --- a/shopfloor_reception_packaging_dimension/README.rst +++ b/shopfloor_reception_packaging_dimension/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - ======================================= Shopfloor Reception Packaging Dimension ======================================= @@ -17,17 +13,17 @@ Shopfloor Reception Packaging Dimension .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--shopfloor-lightgray.png?logo=github - :target: https://github.com/OCA/stock-logistics-shopfloor/tree/18.0/shopfloor_reception_packaging_dimension - :alt: OCA/stock-logistics-shopfloor +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github + :target: https://github.com/OCA/wms/tree/16.0/shopfloor_reception_packaging_dimension + :alt: OCA/wms .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-shopfloor-18-0/stock-logistics-shopfloor-18-0-shopfloor_reception_packaging_dimension + :target: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_reception_packaging_dimension :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-shopfloor&target_branch=18.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/wms&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -46,10 +42,10 @@ update the missing information. Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -87,6 +83,6 @@ Current `maintainer `__: |maintainer-TDu| -This module is part of the `OCA/stock-logistics-shopfloor `_ project on GitHub. +This module is part of the `OCA/wms `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py index 7e3f8b99edc..9b90ab14f33 100644 --- a/shopfloor_reception_packaging_dimension/__manifest__.py +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -6,7 +6,7 @@ "version": "18.0.1.1.0", "development_status": "Beta", "category": "Inventory", - "website": "https://github.com/OCA/stock-logistics-shopfloor", + "website": "https://github.com/OCA/wms", "author": "Camptocamp, Odoo Community Association (OCA)", "maintainers": ["TDu"], "license": "AGPL-3", diff --git a/shopfloor_reception_packaging_dimension/static/description/index.html b/shopfloor_reception_packaging_dimension/static/description/index.html index fd1a3a9de72..385bf696e3c 100644 --- a/shopfloor_reception_packaging_dimension/static/description/index.html +++ b/shopfloor_reception_packaging_dimension/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Shopfloor Reception Packaging Dimension -

+
+

Shopfloor Reception Packaging Dimension

- - -Odoo Community Association - -
-

Shopfloor Reception Packaging Dimension

-

Beta License: AGPL-3 OCA/stock-logistics-shopfloor Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

This module adds an option to the reception scenario. When activated. Before setting the quantity for the reception, if there is product packaging related to the product received with missing information, the @@ -393,29 +388,29 @@

Shopfloor Reception Packaging Dimension

-

Bug Tracker

-

Bugs are tracked on GitHub Issues. +

Bug Tracker

+

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • Camptocamp
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -425,11 +420,10 @@

Maintainers

promote its widespread use.

Current maintainer:

TDu

-

This module is part of the OCA/stock-logistics-shopfloor project on GitHub.

+

This module is part of the OCA/wms project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

-
From 18735a0844e8b2309c3af715ec49997c6bbd1ca0 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 5 Sep 2025 13:30:44 +0200 Subject: [PATCH 21/43] [MIG] shopfloor_reception_packaging_dimension: Migration to 16.0 (from 18.0) --- .../odoo/addons/shopfloor_reception_packaging_dimension | 1 + setup/shopfloor_reception_packaging_dimension/setup.py | 6 ++++++ shopfloor_reception_packaging_dimension/README.rst | 1 + shopfloor_reception_packaging_dimension/__manifest__.py | 2 +- shopfloor_reception_packaging_dimension/hooks.py | 8 ++++++-- .../readme/CONTRIBUTORS.md | 1 + .../static/description/index.html | 1 + .../views/shopfloor_menu.xml | 3 ++- 8 files changed, 19 insertions(+), 4 deletions(-) create mode 120000 setup/shopfloor_reception_packaging_dimension/odoo/addons/shopfloor_reception_packaging_dimension create mode 100644 setup/shopfloor_reception_packaging_dimension/setup.py diff --git a/setup/shopfloor_reception_packaging_dimension/odoo/addons/shopfloor_reception_packaging_dimension b/setup/shopfloor_reception_packaging_dimension/odoo/addons/shopfloor_reception_packaging_dimension new file mode 120000 index 00000000000..9ff2c52e7ae --- /dev/null +++ b/setup/shopfloor_reception_packaging_dimension/odoo/addons/shopfloor_reception_packaging_dimension @@ -0,0 +1 @@ +../../../../shopfloor_reception_packaging_dimension \ No newline at end of file diff --git a/setup/shopfloor_reception_packaging_dimension/setup.py b/setup/shopfloor_reception_packaging_dimension/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/shopfloor_reception_packaging_dimension/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/shopfloor_reception_packaging_dimension/README.rst b/shopfloor_reception_packaging_dimension/README.rst index 5d22e1c29d6..9ad7f5dc789 100644 --- a/shopfloor_reception_packaging_dimension/README.rst +++ b/shopfloor_reception_packaging_dimension/README.rst @@ -61,6 +61,7 @@ Contributors ------------ - Thierry Ducrest +- Denis Roussel Maintainers ----------- diff --git a/shopfloor_reception_packaging_dimension/__manifest__.py b/shopfloor_reception_packaging_dimension/__manifest__.py index 9b90ab14f33..ea28dc77e86 100644 --- a/shopfloor_reception_packaging_dimension/__manifest__.py +++ b/shopfloor_reception_packaging_dimension/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Shopfloor Reception Packaging Dimension", "summary": "Collect Packaging Dimension from the Reception scenario", - "version": "18.0.1.1.0", + "version": "16.0.1.0.0", "development_status": "Beta", "category": "Inventory", "website": "https://github.com/OCA/wms", diff --git a/shopfloor_reception_packaging_dimension/hooks.py b/shopfloor_reception_packaging_dimension/hooks.py index eca59a9c6c0..763dee221f3 100644 --- a/shopfloor_reception_packaging_dimension/hooks.py +++ b/shopfloor_reception_packaging_dimension/hooks.py @@ -4,6 +4,8 @@ import json import logging +from odoo import SUPERUSER_ID, api + from odoo.addons.shopfloor_base.utils import purge_endpoints, register_new_services from .services.reception import Reception as Service @@ -11,7 +13,8 @@ _logger = logging.getLogger(__file__) -def post_init_hook(env): +def post_init_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) _logger.info("Add set packaging dimension option on reception scenario") scenario = env.ref("shopfloor_reception.scenario_reception") options = scenario.options @@ -25,7 +28,8 @@ def post_init_hook(env): register_new_services(env, Service) -def uninstall_hook(env): +def uninstall_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) _logger.info("Remove set packaging dimension option on reception scenario") scenario = env.ref("shopfloor_reception.scenario_reception") options = scenario.options diff --git a/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.md b/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.md index 62ceaf42fc5..e3bb8b0f9b7 100644 --- a/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.md +++ b/shopfloor_reception_packaging_dimension/readme/CONTRIBUTORS.md @@ -1 +1,2 @@ - Thierry Ducrest \<\> +- Denis Roussel \<\> \ No newline at end of file diff --git a/shopfloor_reception_packaging_dimension/static/description/index.html b/shopfloor_reception_packaging_dimension/static/description/index.html index 385bf696e3c..84e2fae6a45 100644 --- a/shopfloor_reception_packaging_dimension/static/description/index.html +++ b/shopfloor_reception_packaging_dimension/static/description/index.html @@ -407,6 +407,7 @@

Authors

Contributors

diff --git a/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml b/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml index fe4c6ec92f5..42c46d55a28 100644 --- a/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml +++ b/shopfloor_reception_packaging_dimension/views/shopfloor_menu.xml @@ -5,9 +5,10 @@ + From e3af113126564740957c00f81df48a1e4c88d1f5 Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Wed, 7 Jun 2023 05:18:46 +0200 Subject: [PATCH 22/43] Add shopfloor_reception_packaging_dimension_mobile --- .../README.rst | 79 +++++++++ .../__init__.py | 0 .../__manifest__.py | 19 +++ .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 4 + .../scenario/reception_packaging_dimension.js | 150 ++++++++++++++++++ .../templates/assets.xml | 25 +++ 7 files changed, 278 insertions(+) create mode 100644 shopfloor_reception_packaging_dimension_mobile/README.rst create mode 100644 shopfloor_reception_packaging_dimension_mobile/__init__.py create mode 100644 shopfloor_reception_packaging_dimension_mobile/__manifest__.py create mode 100644 shopfloor_reception_packaging_dimension_mobile/readme/CONTRIBUTORS.rst create mode 100644 shopfloor_reception_packaging_dimension_mobile/readme/DESCRIPTION.rst create mode 100644 shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js create mode 100644 shopfloor_reception_packaging_dimension_mobile/templates/assets.xml diff --git a/shopfloor_reception_packaging_dimension_mobile/README.rst b/shopfloor_reception_packaging_dimension_mobile/README.rst new file mode 100644 index 00000000000..326943dfe9b --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/README.rst @@ -0,0 +1,79 @@ +============================================= +Shopfloor Checkout Package Measurement Mobile +============================================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github + :target: https://github.com/OCA/wms/tree/14.0/shopfloor_checkout_package_measurement_mobile + :alt: OCA/wms +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_checkout_package_measurement_mobile + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/285/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the front end part for the `shopfloor_checkout_package_measurement` module. +Allowing to set package measurements from the mobile shopfloor application. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Thierry Ducrest + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/wms `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/shopfloor_reception_packaging_dimension_mobile/__init__.py b/shopfloor_reception_packaging_dimension_mobile/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/shopfloor_reception_packaging_dimension_mobile/__manifest__.py b/shopfloor_reception_packaging_dimension_mobile/__manifest__.py new file mode 100644 index 00000000000..503602e7377 --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2023 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +{ + "name": "Shopfloor Reception Packaging Dimension Mobile", + "summary": "Frontend for the packaging dimension on reception scenario", + "version": "14.0.1.0.0", + "development_status": "Alpha", + "category": "Inventory", + "website": "https://github.com/OCA/wms", + "author": "Camptocamp, Odoo Community Association (OCA)", + "maintainers": ["TDu"], + "license": "AGPL-3", + "depends": [ + "shopfloor_reception_mobile", + "shopfloor_reception_packaging_dimension", + ], + "data": ["templates/assets.xml"], +} diff --git a/shopfloor_reception_packaging_dimension_mobile/readme/CONTRIBUTORS.rst b/shopfloor_reception_packaging_dimension_mobile/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..0dd376faecb --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Thierry Ducrest diff --git a/shopfloor_reception_packaging_dimension_mobile/readme/DESCRIPTION.rst b/shopfloor_reception_packaging_dimension_mobile/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..ab7978b5619 --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +This module adds the front end part for the `shopfloor_reception_packaging_dimension` +module. Allowing to set dimension on packaging related to the product being processed, +if they are not set already. +The option needs to be enable on the shopfloor menu. diff --git a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js new file mode 100644 index 00000000000..dc75b3f9755 --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js @@ -0,0 +1,150 @@ +/** + * Copyright 2023 Camptocamp SA (http://www.camptocamp.com) + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + */ + +import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js"; + +import {reception_states} from "/shopfloor_reception_mobile/static/src/scenario/reception_states.js"; + +// Get the original template of the reception scenario +const reception_scenario = process_registry.get("reception"); +const template = reception_scenario.component.template; +// And inject the new state template (for this module) into it +const pos = template.indexOf(""); + +const new_template = + template.substring(0, pos) + + ` +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + Done + + + + + + Skip + + + +
+
+ +` + + template.substring(pos); + +// Extend the reception scenario with : +// - the new patched template +// - the js code for the new state +const ReceptionPackageDimension = process_registry.extend("reception", { + template: new_template, + "methods._get_states": function () { + let states = reception_states.bind(this)(); + states["set_packaging_dimension"] = { + display_info: { + title: "Set packaging dimension", + }, + events: { + go_back: "on_back", + }, + get_payload_set_packaging_dimension: () => { + let values = { + picking_id: this.state.data.picking.id, + selected_line_id: this.state.data.selected_move_line.id, + packaging_id: this.state.data.packaging.id, + }; + const measurements = [ + "length", + "width", + "height", + "max_weight", + "qty", + "barcode", + ]; + for (const measurement of measurements) { + values[measurement] = this.state.data.packaging[measurement]; + } + return values; + }, + on_skip: () => { + const payload = this.state.get_payload_set_packaging_dimension(); + payload["cancel"] = true; + this.wait_call(this.odoo.call("set_packaging_dimension", payload)); + }, + on_done: () => { + const payload = this.state.get_payload_set_packaging_dimension(); + this.wait_call(this.odoo.call("set_packaging_dimension", payload)); + }, + }; + return states; + }, +}); + +process_registry.replace("reception", ReceptionPackageDimension); diff --git a/shopfloor_reception_packaging_dimension_mobile/templates/assets.xml b/shopfloor_reception_packaging_dimension_mobile/templates/assets.xml new file mode 100644 index 00000000000..000d0fa522b --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/templates/assets.xml @@ -0,0 +1,25 @@ + + + + + + + From bd97e3aad5abfc89911fdc9b38633a848fd89220 Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Tue, 11 Jul 2023 13:53:58 +0200 Subject: [PATCH 23/43] sh_reception_packaging_dimension_mobile: refactor for extensibility --- .../scenario/reception_packaging_dimension.js | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js index dc75b3f9755..980adbbb2ac 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js +++ b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js @@ -5,14 +5,12 @@ import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js"; -import {reception_states} from "/shopfloor_reception_mobile/static/src/scenario/reception_states.js"; - -// Get the original template of the reception scenario const reception_scenario = process_registry.get("reception"); +const _get_states = reception_scenario.component.methods._get_states; +// Get the original template of the reception scenario const template = reception_scenario.component.template; // And inject the new state template (for this module) into it const pos = template.indexOf(""); - const new_template = template.substring(0, pos) + ` @@ -77,7 +75,7 @@ const new_template = v-model="state.data.packaging.max_weight" > - + @@ -105,8 +103,11 @@ const new_template = // - the js code for the new state const ReceptionPackageDimension = process_registry.extend("reception", { template: new_template, + "methods.get_packaging_measurements": function () { + return ["length", "width", "height", "max_weight", "qty", "barcode"]; + }, "methods._get_states": function () { - let states = reception_states.bind(this)(); + let states = _get_states.bind(this)(); states["set_packaging_dimension"] = { display_info: { title: "Set packaging dimension", @@ -120,15 +121,7 @@ const ReceptionPackageDimension = process_registry.extend("reception", { selected_line_id: this.state.data.selected_move_line.id, packaging_id: this.state.data.packaging.id, }; - const measurements = [ - "length", - "width", - "height", - "max_weight", - "qty", - "barcode", - ]; - for (const measurement of measurements) { + for (const measurement of this.get_packaging_measurements()) { values[measurement] = this.state.data.packaging[measurement]; } return values; From 5ba63493c197c09c7891dc4d8810f08bb11d4a74 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 7 Nov 2023 09:11:12 +0000 Subject: [PATCH 24/43] [UPD] Update shopfloor_reception_packaging_dimension_mobile.pot --- ...opfloor_reception_packaging_dimension_mobile.pot | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 shopfloor_reception_packaging_dimension_mobile/i18n/shopfloor_reception_packaging_dimension_mobile.pot diff --git a/shopfloor_reception_packaging_dimension_mobile/i18n/shopfloor_reception_packaging_dimension_mobile.pot b/shopfloor_reception_packaging_dimension_mobile/i18n/shopfloor_reception_packaging_dimension_mobile.pot new file mode 100644 index 00000000000..4d8b20f912f --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/i18n/shopfloor_reception_packaging_dimension_mobile.pot @@ -0,0 +1,13 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" From befd37b43eb1a75c6a991a2aa80714c9025203e7 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 7 Nov 2023 09:36:44 +0000 Subject: [PATCH 25/43] [BOT] post-merge updates --- .../README.rst | 43 +- .../__manifest__.py | 2 +- .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 432 ++++++++++++++++++ 4 files changed, 461 insertions(+), 16 deletions(-) create mode 100644 shopfloor_reception_packaging_dimension_mobile/static/description/icon.png create mode 100644 shopfloor_reception_packaging_dimension_mobile/static/description/index.html diff --git a/shopfloor_reception_packaging_dimension_mobile/README.rst b/shopfloor_reception_packaging_dimension_mobile/README.rst index 326943dfe9b..0c7b199f48f 100644 --- a/shopfloor_reception_packaging_dimension_mobile/README.rst +++ b/shopfloor_reception_packaging_dimension_mobile/README.rst @@ -1,11 +1,14 @@ -============================================= -Shopfloor Checkout Package Measurement Mobile -============================================= +============================================== +Shopfloor Reception Packaging Dimension Mobile +============================================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:0a022165b9c574559c392b7d2b419b9c0373bc82fc777cc497f937a75738af1a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png :target: https://odoo-community.org/page/development-status @@ -14,19 +17,21 @@ Shopfloor Checkout Package Measurement Mobile :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github - :target: https://github.com/OCA/wms/tree/14.0/shopfloor_checkout_package_measurement_mobile + :target: https://github.com/OCA/wms/tree/14.0/shopfloor_reception_packaging_dimension_mobile :alt: OCA/wms .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_checkout_package_measurement_mobile + :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_reception_packaging_dimension_mobile :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/285/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/wms&target_branch=14.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| -This module adds the front end part for the `shopfloor_checkout_package_measurement` module. -Allowing to set package measurements from the mobile shopfloor application. +This module adds the front end part for the `shopfloor_reception_packaging_dimension` +module. Allowing to set dimension on packaging related to the product being processed, +if they are not set already. +The option needs to be enable on the shopfloor menu. .. IMPORTANT:: This is an alpha version, the data model and design can change at any time without warning. @@ -43,8 +48,8 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -74,6 +79,14 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/wms `_ project on GitHub. +.. |maintainer-TDu| image:: https://github.com/TDu.png?size=40px + :target: https://github.com/TDu + :alt: TDu + +Current `maintainer `__: + +|maintainer-TDu| + +This module is part of the `OCA/wms `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/shopfloor_reception_packaging_dimension_mobile/__manifest__.py b/shopfloor_reception_packaging_dimension_mobile/__manifest__.py index 503602e7377..6d7fb613af5 100644 --- a/shopfloor_reception_packaging_dimension_mobile/__manifest__.py +++ b/shopfloor_reception_packaging_dimension_mobile/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Shopfloor Reception Packaging Dimension Mobile", "summary": "Frontend for the packaging dimension on reception scenario", - "version": "14.0.1.0.0", + "version": "14.0.1.1.0", "development_status": "Alpha", "category": "Inventory", "website": "https://github.com/OCA/wms", diff --git a/shopfloor_reception_packaging_dimension_mobile/static/description/icon.png b/shopfloor_reception_packaging_dimension_mobile/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0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}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/shopfloor_reception_packaging_dimension_mobile/static/description/index.html b/shopfloor_reception_packaging_dimension_mobile/static/description/index.html new file mode 100644 index 00000000000..c1d0d932025 --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/static/description/index.html @@ -0,0 +1,432 @@ + + + + + + +Shopfloor Reception Packaging Dimension Mobile + + + +
+

Shopfloor Reception Packaging Dimension Mobile

+ + +

Alpha License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

+

This module adds the front end part for the shopfloor_reception_packaging_dimension +module. Allowing to set dimension on packaging related to the product being processed, +if they are not set already. +The option needs to be enable on the shopfloor menu.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

TDu

+

This module is part of the OCA/wms project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + From 1cc816d94f76f7418e70ae12af0850d7c222605f Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 7 Nov 2023 13:10:11 +0000 Subject: [PATCH 26/43] Added translation using Weblate (Italian) --- .../i18n/it.po | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 shopfloor_reception_packaging_dimension_mobile/i18n/it.po diff --git a/shopfloor_reception_packaging_dimension_mobile/i18n/it.po b/shopfloor_reception_packaging_dimension_mobile/i18n/it.po new file mode 100644 index 00000000000..9ce4346f63e --- /dev/null +++ b/shopfloor_reception_packaging_dimension_mobile/i18n/it.po @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" From 441a5e9780fc5bb62f44100fe039ab4bddbea5c6 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 5 Sep 2025 13:58:52 +0200 Subject: [PATCH 27/43] [IMP] shopfloor_reception_packaging_dimension_mobile: pre-commit autofixes --- .../addons/shopfloor_reception_packaging_dimension_mobile | 1 + .../shopfloor_reception_packaging_dimension_mobile/setup.py | 6 ++++++ 2 files changed, 7 insertions(+) create mode 120000 setup/shopfloor_reception_packaging_dimension_mobile/odoo/addons/shopfloor_reception_packaging_dimension_mobile create mode 100644 setup/shopfloor_reception_packaging_dimension_mobile/setup.py diff --git a/setup/shopfloor_reception_packaging_dimension_mobile/odoo/addons/shopfloor_reception_packaging_dimension_mobile b/setup/shopfloor_reception_packaging_dimension_mobile/odoo/addons/shopfloor_reception_packaging_dimension_mobile new file mode 120000 index 00000000000..a9ab8c21f8f --- /dev/null +++ b/setup/shopfloor_reception_packaging_dimension_mobile/odoo/addons/shopfloor_reception_packaging_dimension_mobile @@ -0,0 +1 @@ +../../../../shopfloor_reception_packaging_dimension_mobile \ No newline at end of file diff --git a/setup/shopfloor_reception_packaging_dimension_mobile/setup.py b/setup/shopfloor_reception_packaging_dimension_mobile/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/shopfloor_reception_packaging_dimension_mobile/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From 69a1afcd85ffb058a54e8027e8a9f83a95dac922 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 5 Sep 2025 14:00:24 +0200 Subject: [PATCH 28/43] [MIG] shopfloor_reception_packaging_dimension_mobile: Migration to 16.0 --- .../README.rst | 20 ++++++--------- .../__manifest__.py | 3 +-- .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 25 ++++++++----------- 4 files changed, 21 insertions(+), 28 deletions(-) diff --git a/shopfloor_reception_packaging_dimension_mobile/README.rst b/shopfloor_reception_packaging_dimension_mobile/README.rst index 0c7b199f48f..61ce5c6b1f0 100644 --- a/shopfloor_reception_packaging_dimension_mobile/README.rst +++ b/shopfloor_reception_packaging_dimension_mobile/README.rst @@ -10,20 +10,20 @@ Shopfloor Reception Packaging Dimension Mobile !! source digest: sha256:0a022165b9c574559c392b7d2b419b9c0373bc82fc777cc497f937a75738af1a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status - :alt: Alpha + :alt: Beta .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github - :target: https://github.com/OCA/wms/tree/14.0/shopfloor_reception_packaging_dimension_mobile + :target: https://github.com/OCA/wms/tree/16.0/shopfloor_reception_packaging_dimension_mobile :alt: OCA/wms .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_reception_packaging_dimension_mobile + :target: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_reception_packaging_dimension_mobile :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/wms&target_branch=14.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/wms&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -33,11 +33,6 @@ module. Allowing to set dimension on packaging related to the product being proc if they are not set already. The option needs to be enable on the shopfloor menu. -.. IMPORTANT:: - This is an alpha version, the data model and design can change at any time without warning. - Only for development or testing purpose, do not use in production. - `More details on development status `_ - **Table of contents** .. contents:: @@ -49,7 +44,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -65,6 +60,7 @@ Contributors ~~~~~~~~~~~~ * Thierry Ducrest +* Denis Roussel Maintainers ~~~~~~~~~~~ @@ -87,6 +83,6 @@ Current `maintainer `__: |maintainer-TDu| -This module is part of the `OCA/wms `_ project on GitHub. +This module is part of the `OCA/wms `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/shopfloor_reception_packaging_dimension_mobile/__manifest__.py b/shopfloor_reception_packaging_dimension_mobile/__manifest__.py index 6d7fb613af5..0fbd8188128 100644 --- a/shopfloor_reception_packaging_dimension_mobile/__manifest__.py +++ b/shopfloor_reception_packaging_dimension_mobile/__manifest__.py @@ -4,8 +4,7 @@ { "name": "Shopfloor Reception Packaging Dimension Mobile", "summary": "Frontend for the packaging dimension on reception scenario", - "version": "14.0.1.1.0", - "development_status": "Alpha", + "version": "16.0.1.0.0", "category": "Inventory", "website": "https://github.com/OCA/wms", "author": "Camptocamp, Odoo Community Association (OCA)", diff --git a/shopfloor_reception_packaging_dimension_mobile/readme/CONTRIBUTORS.rst b/shopfloor_reception_packaging_dimension_mobile/readme/CONTRIBUTORS.rst index 0dd376faecb..9dda9dc4be2 100644 --- a/shopfloor_reception_packaging_dimension_mobile/readme/CONTRIBUTORS.rst +++ b/shopfloor_reception_packaging_dimension_mobile/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Thierry Ducrest +* Denis Roussel diff --git a/shopfloor_reception_packaging_dimension_mobile/static/description/index.html b/shopfloor_reception_packaging_dimension_mobile/static/description/index.html index c1d0d932025..6b74bc7bd66 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/description/index.html +++ b/shopfloor_reception_packaging_dimension_mobile/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,17 +369,11 @@

Shopfloor Reception Packaging Dimension Mobile

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:0a022165b9c574559c392b7d2b419b9c0373bc82fc777cc497f937a75738af1a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Alpha License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

This module adds the front end part for the shopfloor_reception_packaging_dimension module. Allowing to set dimension on packaging related to the product being processed, if they are not set already. The option needs to be enable on the shopfloor menu.

-
-

Important

-

This is an alpha version, the data model and design can change at any time without warning. -Only for development or testing purpose, do not use in production. -More details on development status

-

Table of contents

    @@ -397,7 +391,7 @@

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

@@ -412,18 +406,21 @@

Authors

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

TDu

-

This module is part of the OCA/wms project on GitHub.

+

This module is part of the OCA/wms project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

From 95a3463e688db9873cc10a421cc962d052116038 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Mon, 13 Oct 2025 10:31:40 +0200 Subject: [PATCH 29/43] [FIX] shopfloor_reception_packaging_dimension_mobile: Use correct field for packaging weight --- .../static/src/scenario/reception_packaging_dimension.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js index 980adbbb2ac..30138f958c8 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js +++ b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js @@ -68,11 +68,11 @@ const new_template = @@ -104,7 +104,7 @@ const new_template = const ReceptionPackageDimension = process_registry.extend("reception", { template: new_template, "methods.get_packaging_measurements": function () { - return ["length", "width", "height", "max_weight", "qty", "barcode"]; + return ["length", "width", "height", "weight", "qty", "barcode"]; }, "methods._get_states": function () { let states = _get_states.bind(this)(); From fb6c09578dbba3e7ec6e37f27b45361bbd389d1f Mon Sep 17 00:00:00 2001 From: Mmequignon Date: Tue, 23 Sep 2025 10:56:26 +0200 Subject: [PATCH 30/43] shopfloor_reception_packaging_dimension: Collect dimension optional when barcode empty --- .../models/product_packaging_level.py | 7 +- .../services/reception.py | 5 +- .../tests/test_set_package_dimension.py | 70 +++++++++++-------- .../views/product_packaging_level.xml | 1 + 4 files changed, 51 insertions(+), 32 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/models/product_packaging_level.py b/shopfloor_reception_packaging_dimension/models/product_packaging_level.py index f766f5be621..b0070d9262f 100644 --- a/shopfloor_reception_packaging_dimension/models/product_packaging_level.py +++ b/shopfloor_reception_packaging_dimension/models/product_packaging_level.py @@ -3,7 +3,7 @@ from odoo import fields, models HELP_TEXT = ( - "When marked, shopfloor will require to set this dimension during " + "When marked, shopfloor will require to set dimensions during " "reception if undefined on the packaging" ) @@ -31,3 +31,8 @@ class ProductPackagingLevel(models.Model): default=True, help=HELP_TEXT, ) + shopfloor_collect_barcode = fields.Boolean( + "Collect Barcode", + default=True, + help=HELP_TEXT, + ) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index 695c6d0b8d8..bcce750e136 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -52,7 +52,10 @@ def _get_domain_packaging_needs_dimension(self): ("weight", "=", 0), ("weight", "=", False), ], - [("barcode", "=", False)], + [ + ("packaging_level_id.shopfloor_collect_barcode", "=", True), + ("barcode", "=", False), + ], ] ) diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index d797f6b4c03..9f31e223a2b 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -23,6 +23,7 @@ def setUpClassBaseData(cls): "shopfloor_collect_width": True, "shopfloor_collect_height": True, "shopfloor_collect_weight": True, + "shopfloor_collect_barcode": True, } ) # Picking has 3 products @@ -88,6 +89,7 @@ def test_scan_product_dimension_already_defined(self): "width": 5.0, "height": 2.0, "weight": 1.5, + "barcode": "BARCODE", } ) response = self.service.dispatch( @@ -110,16 +112,48 @@ def test_scan_product_dimension_already_defined(self): }, ) - def test_scan_product_dimension_not_needed(self): + def test_show_set_dimension_screen(self): self.product_a.tracking = "none" - self.default_packaging_level.sudo().write( + # Configure product so it should hit every condition + self.product_a.packaging_ids.write( { - "shopfloor_collect_length": False, - "shopfloor_collect_width": False, - "shopfloor_collect_height": False, - "shopfloor_collect_weight": False, + "packaging_length": 0, + "width": 0, + "height": 0, + "weight": 0, + "barcode": False, } ) + # Set collect values to false + collect_field_names = [ + "shopfloor_collect_length", + "shopfloor_collect_width", + "shopfloor_collect_height", + "shopfloor_collect_weight", + "shopfloor_collect_barcode", + ] + no_collect_dict = {field: False for field in collect_field_names} + selected_move_line = self.picking.move_line_ids.filtered( + lambda li: li.product_id == self.product_a + ) + for field_name in no_collect_dict.keys(): + # For each field, set only this condition to true, and ensure next screen + # is set_dimension + vals = dict(no_collect_dict, **{field_name: True}) + self.default_packaging_level.sudo().write(vals) + response = self.service.dispatch( + "scan_line", + params={ + "picking_id": self.picking.id, + "barcode": self.product_a.barcode, + }, + ) + self._assert_response_set_dimension( + response, self.picking, selected_move_line, self.product_a_packaging + ) + # when all collect values are False, no dimension is needed, next screen + # is set_dimension + self.default_packaging_level.sudo().write(no_collect_dict) response = self.service.dispatch( "scan_line", params={ @@ -127,9 +161,6 @@ def test_scan_product_dimension_not_needed(self): "barcode": self.product_a.barcode, }, ) - selected_move_line = self.picking.move_line_ids.filtered( - lambda li: li.product_id == self.product_a - ) self.assert_response( response, next_state="set_quantity", @@ -140,27 +171,6 @@ def test_scan_product_dimension_not_needed(self): }, ) - def test_scan_lot_ask_for_dimension(self): - self.product_a.tracking = "none" - selected_move_line = self.picking.move_line_ids.filtered( - lambda li: li.product_id == self.product_a - ) - self.assertTrue(self.product_a.packaging_ids) - response = self.service.dispatch( - "set_lot_confirm_action", - params={ - "picking_id": self.picking.id, - "selected_line_id": selected_move_line.id, - }, - ) - self.data.picking(self.picking) - selected_move_line = self.picking.move_line_ids.filtered( - lambda li: li.product_id == self.product_a - ) - self._assert_response_set_dimension( - response, self.picking, selected_move_line, self.product_a_packaging - ) - def test_set_packaging_dimension(self): selected_move_line = self.picking.move_line_ids.filtered( lambda li: li.product_id == self.product_a diff --git a/shopfloor_reception_packaging_dimension/views/product_packaging_level.xml b/shopfloor_reception_packaging_dimension/views/product_packaging_level.xml index 93950b5f655..c8634809a03 100644 --- a/shopfloor_reception_packaging_dimension/views/product_packaging_level.xml +++ b/shopfloor_reception_packaging_dimension/views/product_packaging_level.xml @@ -15,6 +15,7 @@ + From 8e56fd87eb1ea1202273f62c9821903a2d3fa5e2 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Thu, 26 Feb 2026 08:13:13 +0100 Subject: [PATCH 31/43] [IMP] shopfloor_reception_packaging_dimension: format readme and index.html --- .../README.rst | 6 ++++- .../static/description/index.html | 24 ++++++++++++------- .../README.rst | 6 ++++- .../static/description/index.html | 24 ++++++++++++------- 4 files changed, 40 insertions(+), 20 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/README.rst b/shopfloor_reception_packaging_dimension/README.rst index 9ad7f5dc789..fe2cb72b8c3 100644 --- a/shopfloor_reception_packaging_dimension/README.rst +++ b/shopfloor_reception_packaging_dimension/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ======================================= Shopfloor Reception Packaging Dimension ======================================= @@ -13,7 +17,7 @@ Shopfloor Reception Packaging Dimension .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github diff --git a/shopfloor_reception_packaging_dimension/static/description/index.html b/shopfloor_reception_packaging_dimension/static/description/index.html index 84e2fae6a45..d28b1eb9da8 100644 --- a/shopfloor_reception_packaging_dimension/static/description/index.html +++ b/shopfloor_reception_packaging_dimension/static/description/index.html @@ -3,7 +3,7 @@ -Shopfloor Reception Packaging Dimension +README.rst -
-

Shopfloor Reception Packaging Dimension

+
+ + +Odoo Community Association + +
+

Shopfloor Reception Packaging Dimension

-

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

This module adds an option to the reception scenario. When activated. Before setting the quantity for the reception, if there is product packaging related to the product received with missing information, the @@ -388,7 +393,7 @@

Shopfloor Reception Packaging Dimension

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -396,22 +401,22 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

+
diff --git a/shopfloor_reception_packaging_dimension_mobile/README.rst b/shopfloor_reception_packaging_dimension_mobile/README.rst index 61ce5c6b1f0..0b682c68b53 100644 --- a/shopfloor_reception_packaging_dimension_mobile/README.rst +++ b/shopfloor_reception_packaging_dimension_mobile/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ============================================== Shopfloor Reception Packaging Dimension Mobile ============================================== @@ -13,7 +17,7 @@ Shopfloor Reception Packaging Dimension Mobile .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github diff --git a/shopfloor_reception_packaging_dimension_mobile/static/description/index.html b/shopfloor_reception_packaging_dimension_mobile/static/description/index.html index 6b74bc7bd66..ebeec41788d 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/description/index.html +++ b/shopfloor_reception_packaging_dimension_mobile/static/description/index.html @@ -3,7 +3,7 @@ -Shopfloor Reception Packaging Dimension Mobile +README.rst -
-

Shopfloor Reception Packaging Dimension Mobile

+
+ + +Odoo Community Association + +
+

Shopfloor Reception Packaging Dimension Mobile

-

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

This module adds the front end part for the shopfloor_reception_packaging_dimension module. Allowing to set dimension on packaging related to the product being processed, if they are not set already. @@ -387,7 +392,7 @@

Shopfloor Reception Packaging Dimension Mobile

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -395,22 +400,22 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

+
From 9b26d3f0e69c01faf7ea1065772255d723a3e2a5 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Thu, 26 Feb 2026 08:13:20 +0100 Subject: [PATCH 32/43] [FIX] shopfloor_reception_packaging_dimension: prevent session recovery noise in tests Reset 'shopfloor_user_id' on the move line after the assertion to prevent subsequent test steps from triggering a session recovery warning. --- .../tests/test_set_package_dimension.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index 9f31e223a2b..d04d9e335c7 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -151,6 +151,9 @@ def test_show_set_dimension_screen(self): self._assert_response_set_dimension( response, self.picking, selected_move_line, self.product_a_packaging ) + # To avoid the message about recovering a session + selected_move_line.shopfloor_user_id = False + # when all collect values are False, no dimension is needed, next screen # is set_dimension self.default_packaging_level.sudo().write(no_collect_dict) From 1ae9026cf3f57a90ae67866d3e1558e7d29e107a Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Thu, 19 Feb 2026 12:02:46 +0100 Subject: [PATCH 33/43] [IMP] shopfloor_reception_packaging_dimension: use custom packaging parser By introducing a specific packaging parser, we ensure we get exactly the infos we need for the "packaging dimension" scenario --- .../__init__.py | 1 + .../actions/__init__.py | 2 ++ .../actions/data.py | 25 +++++++++++++++++ .../actions/schema.py | 27 +++++++++++++++++++ .../services/reception.py | 8 +++--- .../tests/test_set_package_dimension.py | 2 +- 6 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 shopfloor_reception_packaging_dimension/actions/__init__.py create mode 100644 shopfloor_reception_packaging_dimension/actions/data.py create mode 100644 shopfloor_reception_packaging_dimension/actions/schema.py diff --git a/shopfloor_reception_packaging_dimension/__init__.py b/shopfloor_reception_packaging_dimension/__init__.py index e7386302bbe..d354f467795 100644 --- a/shopfloor_reception_packaging_dimension/__init__.py +++ b/shopfloor_reception_packaging_dimension/__init__.py @@ -1,3 +1,4 @@ from .hooks import post_init_hook, uninstall_hook from . import models from . import services +from . import actions diff --git a/shopfloor_reception_packaging_dimension/actions/__init__.py b/shopfloor_reception_packaging_dimension/actions/__init__.py new file mode 100644 index 00000000000..0049231d56c --- /dev/null +++ b/shopfloor_reception_packaging_dimension/actions/__init__.py @@ -0,0 +1,2 @@ +from . import data +from . import schema diff --git a/shopfloor_reception_packaging_dimension/actions/data.py b/shopfloor_reception_packaging_dimension/actions/data.py new file mode 100644 index 00000000000..b752e41c52b --- /dev/null +++ b/shopfloor_reception_packaging_dimension/actions/data.py @@ -0,0 +1,25 @@ +from odoo.addons.component.core import Component +from odoo.addons.shopfloor_base.utils import ensure_model + + +class DataAction(Component): + _inherit = "shopfloor.data.action" + + @property + def _packaging_dimension_detail_parser(self): + return [ + "id", + "name", + "qty", + "packaging_length:length", + "width", + "height", + "weight", + "length_uom_name", + "weight_uom_name", + "barcode", + ] + + @ensure_model("product.packaging") + def packaging_dimensions(self, record, **kw): + return self._jsonify(record, self._packaging_dimension_detail_parser, **kw) diff --git a/shopfloor_reception_packaging_dimension/actions/schema.py b/shopfloor_reception_packaging_dimension/actions/schema.py new file mode 100644 index 00000000000..6d17c19ab73 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/actions/schema.py @@ -0,0 +1,27 @@ +from odoo.addons.component.core import Component + + +class ShopfloorSchemaAction(Component): + _inherit = "shopfloor.schema.action" + + def packaging_dimensions(self): + return { + "id": {"required": True, "type": "integer"}, + "name": {"type": "string", "nullable": False, "required": True}, + "qty": {"type": "float", "required": True}, + "length": {"type": "float", "nullable": True, "required": False}, + "width": {"type": "float", "nullable": True, "required": False}, + "height": {"type": "float", "nullable": True, "required": False}, + "weight": {"type": "float", "nullable": True, "required": False}, + "length_uom_name": { + "type": "string", + "nullable": True, + "required": False, + }, + "weight_uom_name": { + "type": "string", + "nullable": True, + "required": False, + }, + "barcode": {"type": "string", "nullable": True, "required": False}, + } diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index bcce750e136..f10c55cfc75 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -86,7 +86,7 @@ def _response_for_set_packaging_dimension( ) def _set_packaging_dimension_data_for_packaging(self, packaging): - return self.data_detail.packaging_detail(packaging) + return self.data.packaging_dimensions(packaging) def set_packaging_dimension( self, picking_id, selected_line_id, packaging_id, cancel=False, **kwargs @@ -213,13 +213,13 @@ def _schema_set_packaging_dimension(self): return { "picking": {"type": "dict", "schema": self.schemas.picking()}, "selected_move_line": {"type": "dict", "schema": self.schemas.move_line()}, - "packaging": self._schema_packaging(), + "packaging": self._schema_packaging_dimensions(), } - def _schema_packaging(self): + def _schema_packaging_dimensions(self): return { "type": "dict", - "schema": self.schemas_detail.packaging_detail(), + "schema": self.schemas.packaging_dimensions(), } def _set_packaging_dimension_next_states(self): diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index d04d9e335c7..fa4b2709585 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -53,7 +53,7 @@ def _assert_response_set_dimension( data = { "picking": self.data.picking(picking), "selected_move_line": self.data.move_line(line), - "packaging": self.data_detail.packaging_detail(packaging), + "packaging": self.data.packaging_dimensions(packaging), } self.assert_response( response, From 4bb55610e32cd36f0f4b06e1ecec51d34e14dd8b Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Thu, 19 Feb 2026 13:45:41 +0100 Subject: [PATCH 34/43] [IMP] shopfloor_reception_packaging_dimension_mobile: show selected package details --- .../scenario/reception_packaging_dimension.js | 58 +++++++++++++++++-- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js index 30138f958c8..922920dd090 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js +++ b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js @@ -19,7 +19,7 @@ const new_template = @@ -43,7 +43,7 @@ const new_template = @@ -52,7 +52,7 @@ const new_template = @@ -61,7 +61,7 @@ const new_template = @@ -70,7 +70,7 @@ const new_template = @@ -106,6 +106,54 @@ const ReceptionPackageDimension = process_registry.extend("reception", { "methods.get_packaging_measurements": function () { return ["length", "width", "height", "weight", "qty", "barcode"]; }, + "methods.packaging_detail_options": function () { + const options = { + main: true, + key_title: "name", + title_icon: "mdi-package-variant", + fields: [ + {path: "barcode", label: "Barcode"}, + {path: "qty", label: "Quantity"}, + { + path: "length", + label: "Length", + renderer: function (rec, field) { + const value = _.result(rec, "length", ""); + const uom = _.result(rec, "length_uom_name", ""); + return value + " " + uom; + }, + }, + { + path: "width", + label: "Width", + renderer: function (rec, field) { + const value = _.result(rec, "width", ""); + const uom = _.result(rec, "length_uom_name", ""); + return value + " " + uom; + }, + }, + { + path: "height", + label: "Height", + renderer: function (rec, field) { + const value = _.result(rec, "height", ""); + const uom = _.result(rec, "length_uom_name", ""); + return value + " " + uom; + }, + }, + { + path: "weight", + label: "Weight", + renderer: function (rec, field) { + const value = _.result(rec, "weight", ""); + const uom = _.result(rec, "weight_uom_name", ""); + return value + " " + uom; + }, + }, + ], + }; + return options; + }, "methods._get_states": function () { let states = _get_states.bind(this)(); states["set_packaging_dimension"] = { From f231b685e2eb738ed31c8d093b1edbdcd816fad4 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Thu, 19 Feb 2026 14:42:04 +0100 Subject: [PATCH 35/43] [REF] shopfloor_reception_packaging_dimension: localize and refine update message - Move the 'packaging_dimension_updated' message from shopfloor to this module, as it is only relevant here. - Rename/Update the message to 'packaging_updated' and remove the word "dimension", as the feature also allows updating barcodes and quantity. --- shopfloor/actions/message.py | 6 ------ .../actions/__init__.py | 1 + .../actions/message.py | 17 +++++++++++++++++ .../services/reception.py | 2 +- .../tests/test_set_package_dimension.py | 8 ++------ 5 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 shopfloor_reception_packaging_dimension/actions/message.py diff --git a/shopfloor/actions/message.py b/shopfloor/actions/message.py index e8962bf19bc..5835e401d86 100644 --- a/shopfloor/actions/message.py +++ b/shopfloor/actions/message.py @@ -526,12 +526,6 @@ def packaging_not_found_in_picking(self): "body": _("Packaging not found in the current transfer."), } - def packaging_dimension_updated(self, packaging): - return { - "message_type": "success", - "body": _("Packaging {} dimension updated.").format(packaging.name), - } - def expiration_date_missing(self): return { "message_type": "error", diff --git a/shopfloor_reception_packaging_dimension/actions/__init__.py b/shopfloor_reception_packaging_dimension/actions/__init__.py index 0049231d56c..7bb61dcadf7 100644 --- a/shopfloor_reception_packaging_dimension/actions/__init__.py +++ b/shopfloor_reception_packaging_dimension/actions/__init__.py @@ -1,2 +1,3 @@ from . import data from . import schema +from . import message diff --git a/shopfloor_reception_packaging_dimension/actions/message.py b/shopfloor_reception_packaging_dimension/actions/message.py new file mode 100644 index 00000000000..c15e458fda6 --- /dev/null +++ b/shopfloor_reception_packaging_dimension/actions/message.py @@ -0,0 +1,17 @@ +import logging + +from odoo import _ + +from odoo.addons.component.core import Component + +_logger = logging.getLogger(__name__) + + +class MessageAction(Component): + _inherit = "shopfloor.message.action" + + def packaging_updated(self, packaging): + return { + "message_type": "success", + "body": _("Packaging '{}' updated.").format(packaging.name), + } diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index f10c55cfc75..53344339030 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -109,7 +109,7 @@ def set_packaging_dimension( message = self.msg_store.record_not_found() elif not cancel and self._check_dimension_to_update(kwargs): self._update_packaging_dimension(packaging, kwargs) - message = self.msg_store.packaging_dimension_updated(packaging) + message = self.msg_store.packaging_updated(packaging) if packaging: next_packaging = self._get_next_packaging_to_set_dimension( selected_line.product_id, packaging diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index fa4b2709585..d736046e22d 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -216,9 +216,7 @@ def test_set_multiple_packaging_dimension(self): self.picking, line, self.product_c_packaging_2, - message=self.msg_store.packaging_dimension_updated( - self.product_c_packaging - ), + message=self.msg_store.packaging_updated(self.product_c_packaging), ) response = self.service.dispatch( "set_packaging_dimension", @@ -240,7 +238,5 @@ def test_set_multiple_packaging_dimension(self): "selected_move_line": self.data.move_lines(line), "confirmation_required": None, }, - message=self.msg_store.packaging_dimension_updated( - self.product_c_packaging_2 - ), + message=self.msg_store.packaging_updated(self.product_c_packaging_2), ) From 57d787044cc838fff4ba6606dbaa93632986b0e8 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Fri, 20 Feb 2026 16:18:46 +0100 Subject: [PATCH 36/43] [REF] shopfloor_reception_packaging_dimension: general code improvements - Use guard clause pattern - Update doctstring - Replace list comprehension with a generator expression to avoid allocating useless list in memory --- .../services/reception.py | 63 ++++++++++++------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index 53344339030..277f7a92b57 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -17,13 +17,16 @@ def __init__(self, work_context): def _before_state__set_quantity(self, picking, line, message=None): """Show the packaging dimension screen before the set quantity screen.""" - if self.work.menu.set_packaging_dimension and not self.packaging_update_done: - packaging = self._get_next_packaging_to_set_dimension(line.product_id) - if packaging: - return self._response_for_set_packaging_dimension( - picking, line, packaging, message=message - ) - return super()._before_state__set_quantity(picking, line, message=message) + if not self.work.menu.set_packaging_dimension or self.packaging_update_done: + return super()._before_state__set_quantity(picking, line, message=message) + + packaging = self._get_next_packaging_to_set_dimension(line.product_id) + if not packaging: + return super()._before_state__set_quantity(picking, line, message=message) + + return self._response_for_set_packaging_dimension( + picking, line, packaging, message=message + ) def _get_domain_packaging_needs_dimension(self): return expression.OR( @@ -103,38 +106,54 @@ def set_packaging_dimension( picking = self.env["stock.picking"].browse(picking_id) selected_line = self.env["stock.move.line"].browse(selected_line_id) packaging = self.env["product.packaging"].sudo().browse(packaging_id) - message = None - next_packaging = None + if not packaging: - message = self.msg_store.record_not_found() - elif not cancel and self._check_dimension_to_update(kwargs): + return self._before_state__set_quantity( + picking, selected_line, message=self.msg_store.record_not_found() + ) + + message = None + + if not cancel and self._check_dimension_to_update(kwargs): self._update_packaging_dimension(packaging, kwargs) message = self.msg_store.packaging_updated(packaging) - if packaging: - next_packaging = self._get_next_packaging_to_set_dimension( - selected_line.product_id, packaging - ) + + next_packaging = self._get_next_packaging_to_set_dimension( + selected_line.product_id, packaging + ) if next_packaging: return self._response_for_set_packaging_dimension( picking, selected_line, next_packaging, message=message ) + self.packaging_update_done = True return self._before_state__set_quantity(picking, selected_line, message=message) def _check_dimension_to_update(self, dimensions): - """Return True if any dimension on the packaging needs to be updated""" - return any([value is not None for key, value in dimensions.items()]) + """Check if the Shopfloor payload contains data for a packaging update.""" + return any(value is not None for value in dimensions.values()) def _get_dimension_fields_conversion_map(self): + """ + Get the mapping between JSON keys from the Shopfloor interface + and the technical field names of the product.packaging model. + """ return {"length": "packaging_length"} def _update_packaging_dimension(self, packaging, dimensions_to_update): """Update dimension on the packaging.""" - fields_conv_map = self._get_dimension_fields_conversion_map() - for dimension, value in dimensions_to_update.items(): - if value is not None: - dimension = fields_conv_map.get(dimension, dimension) - packaging[dimension] = value + field_map = self._get_dimension_fields_conversion_map() + values_to_update = {} + + for key, value in dimensions_to_update.items(): + if value is None: + continue + + odoo_field = field_map.get(key, key) + values_to_update[odoo_field] = value + + if values_to_update: + packaging.write(values_to_update) class ShopfloorReceptionValidator(Component): From 79203294e55416790326f149eb420f570fca1c5d Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Fri, 20 Feb 2026 17:00:40 +0100 Subject: [PATCH 37/43] [REF] shopfloor_reception_packaging_dimension: rename 'cancel' to 'skip' Rename the 'cancel' parameter to 'skip' in the set_packaging_dimension service and validator. The term 'skip' is more accurate because the process continues to the next packaging or step rather than aborting some operation. This also aligns the backend logic with the 'Skip' button label used in the Shopfloor UI, improving developer clarity. --- .../services/reception.py | 8 ++++---- .../tests/test_set_package_dimension.py | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index 277f7a92b57..6599840b731 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -92,11 +92,11 @@ def _set_packaging_dimension_data_for_packaging(self, packaging): return self.data.packaging_dimensions(packaging) def set_packaging_dimension( - self, picking_id, selected_line_id, packaging_id, cancel=False, **kwargs + self, picking_id, selected_line_id, packaging_id, skip=False, **kwargs ): """Set the dimension on a product packaging. - If the user cancel the dimension update we still propose the next + If the user skip the dimension update we still propose the next possible packaging. Transitions: @@ -114,7 +114,7 @@ def set_packaging_dimension( message = None - if not cancel and self._check_dimension_to_update(kwargs): + if not skip and self._check_dimension_to_update(kwargs): self._update_packaging_dimension(packaging, kwargs) message = self.msg_store.packaging_updated(packaging) @@ -205,7 +205,7 @@ def set_packaging_dimension(self): "nullable": True, }, "barcode": {"type": "string", "required": False, "nullable": True}, - "cancel": {"type": "boolean"}, + "skip": {"type": "boolean"}, } diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index d736046e22d..edf63517776 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -240,3 +240,6 @@ def test_set_multiple_packaging_dimension(self): }, message=self.msg_store.packaging_updated(self.product_c_packaging_2), ) + + # TODO: Test that skipping dimension entry (skip=True) for one packaging + # correctly transitions to the next pending packaging without saving changes. From d87f3aa9927d9daa9e1d666b1ae45cd22c99d096 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Fri, 20 Feb 2026 17:33:02 +0100 Subject: [PATCH 38/43] [IMP] shopfloor_reception_packaging_dimension_mobile: use input buffers and highlight changes Update the packaging dimension screen to improve data handling and user feedback: - Switch v-model bindings from direct record fields (e.g., 'barcode') to input buffers (e.g., 'barcode_input'). - Implement '_is_field_changed' helper to detect differences between buffered inputs and original record values. - Apply the 'accent' CSS class to detail fields when they have been modified, providing clear visual feedback to the user. - Rename 'get_packaging_measurements' to 'get_packaging_measurements_inputs' to reflect the shift to buffered data. - Align the 'on_skip' payload with the backend rename of 'cancel' to 'skip'. --- .../scenario/reception_packaging_dimension.js | 51 ++++++++++++++----- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js index 922920dd090..5b0be4f6745 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js +++ b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js @@ -28,7 +28,7 @@ const new_template = @@ -36,7 +36,7 @@ const new_template = label="Quantiy" type="number" placeholder="Packaging Quantity" - v-model="state.data.packaging.qty" + v-model="state.data.packaging.qty_input" > @@ -45,7 +45,7 @@ const new_template = type="number" :suffix="state.data.packaging.length_uom_name" placeholder="Packaging Length" - v-model="state.data.packaging.length" + v-model="state.data.packaging.length_input" > @@ -54,7 +54,7 @@ const new_template = type="number" :suffix="state.data.packaging.length_uom_name" placeholder="Packaging Width" - v-model="state.data.packaging.width" + v-model="state.data.packaging.width_input" > @@ -63,7 +63,7 @@ const new_template = type="number" :suffix="state.data.packaging.length_uom_name" placeholder="Packaging Height" - v-model="state.data.packaging.height" + v-model="state.data.packaging.height_input" > @@ -72,7 +72,7 @@ const new_template = type="number" :suffix="state.data.packaging.weight_uom_name" placeholder="Packaging Weight" - v-model="state.data.packaging.weight" + v-model="state.data.packaging.weight_input" > @@ -103,20 +103,41 @@ const new_template = // - the js code for the new state const ReceptionPackageDimension = process_registry.extend("reception", { template: new_template, - "methods.get_packaging_measurements": function () { - return ["length", "width", "height", "weight", "qty", "barcode"]; + "methods.get_packaging_measurements_inputs": function () { + return [ + "length_input", + "width_input", + "height_input", + "weight_input", + "qty_input", + "barcode_input", + ]; }, "methods.packaging_detail_options": function () { + const pkg = this.state.data.packaging; + const _is_field_changed = (fieldName) => { + const inputKey = fieldName + "_input"; + return pkg[inputKey] && pkg[inputKey] != pkg[fieldName]; + }; const options = { main: true, key_title: "name", title_icon: "mdi-package-variant", fields: [ - {path: "barcode", label: "Barcode"}, - {path: "qty", label: "Quantity"}, + { + path: "barcode", + label: "Barcode", + klass: _is_field_changed("barcode") ? "accent" : "", + }, + { + path: "qty", + label: "Quantity", + klass: _is_field_changed("qty") ? "accent" : "", + }, { path: "length", label: "Length", + klass: _is_field_changed("length") ? "accent" : "", renderer: function (rec, field) { const value = _.result(rec, "length", ""); const uom = _.result(rec, "length_uom_name", ""); @@ -126,6 +147,7 @@ const ReceptionPackageDimension = process_registry.extend("reception", { { path: "width", label: "Width", + klass: _is_field_changed("width") ? "accent" : "", renderer: function (rec, field) { const value = _.result(rec, "width", ""); const uom = _.result(rec, "length_uom_name", ""); @@ -135,6 +157,7 @@ const ReceptionPackageDimension = process_registry.extend("reception", { { path: "height", label: "Height", + klass: _is_field_changed("height") ? "accent" : "", renderer: function (rec, field) { const value = _.result(rec, "height", ""); const uom = _.result(rec, "length_uom_name", ""); @@ -144,6 +167,7 @@ const ReceptionPackageDimension = process_registry.extend("reception", { { path: "weight", label: "Weight", + klass: _is_field_changed("weight") ? "accent" : "", renderer: function (rec, field) { const value = _.result(rec, "weight", ""); const uom = _.result(rec, "weight_uom_name", ""); @@ -169,14 +193,15 @@ const ReceptionPackageDimension = process_registry.extend("reception", { selected_line_id: this.state.data.selected_move_line.id, packaging_id: this.state.data.packaging.id, }; - for (const measurement of this.get_packaging_measurements()) { - values[measurement] = this.state.data.packaging[measurement]; + for (const measurement of this.get_packaging_measurements_inputs()) { + values[measurement.replace("_input", "")] = + this.state.data.packaging[measurement]; } return values; }, on_skip: () => { const payload = this.state.get_payload_set_packaging_dimension(); - payload["cancel"] = true; + payload["skip"] = true; this.wait_call(this.odoo.call("set_packaging_dimension", payload)); }, on_done: () => { From bf46036387d72fda56207e93042d16b449c03cb7 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Mon, 23 Feb 2026 08:30:47 +0100 Subject: [PATCH 39/43] [REF] shopfloor_reception_packaging_dimension/mobile: align UI keys with model fields Simplify the data flow between the Shopfloor UI and the backend by removing the unnecessary field mapping. --- .../actions/data.py | 2 +- .../actions/schema.py | 2 +- .../services/reception.py | 14 ++------------ .../tests/test_set_package_dimension.py | 2 +- .../src/scenario/reception_packaging_dimension.js | 10 +++++----- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/actions/data.py b/shopfloor_reception_packaging_dimension/actions/data.py index b752e41c52b..d79286dae93 100644 --- a/shopfloor_reception_packaging_dimension/actions/data.py +++ b/shopfloor_reception_packaging_dimension/actions/data.py @@ -11,7 +11,7 @@ def _packaging_dimension_detail_parser(self): "id", "name", "qty", - "packaging_length:length", + "packaging_length", "width", "height", "weight", diff --git a/shopfloor_reception_packaging_dimension/actions/schema.py b/shopfloor_reception_packaging_dimension/actions/schema.py index 6d17c19ab73..e982635203e 100644 --- a/shopfloor_reception_packaging_dimension/actions/schema.py +++ b/shopfloor_reception_packaging_dimension/actions/schema.py @@ -9,7 +9,7 @@ def packaging_dimensions(self): "id": {"required": True, "type": "integer"}, "name": {"type": "string", "nullable": False, "required": True}, "qty": {"type": "float", "required": True}, - "length": {"type": "float", "nullable": True, "required": False}, + "packaging_length": {"type": "float", "nullable": True, "required": False}, "width": {"type": "float", "nullable": True, "required": False}, "height": {"type": "float", "nullable": True, "required": False}, "weight": {"type": "float", "nullable": True, "required": False}, diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index 6599840b731..c68e609d5ec 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -133,24 +133,14 @@ def _check_dimension_to_update(self, dimensions): """Check if the Shopfloor payload contains data for a packaging update.""" return any(value is not None for value in dimensions.values()) - def _get_dimension_fields_conversion_map(self): - """ - Get the mapping between JSON keys from the Shopfloor interface - and the technical field names of the product.packaging model. - """ - return {"length": "packaging_length"} - def _update_packaging_dimension(self, packaging, dimensions_to_update): """Update dimension on the packaging.""" - field_map = self._get_dimension_fields_conversion_map() values_to_update = {} for key, value in dimensions_to_update.items(): if value is None: continue - - odoo_field = field_map.get(key, key) - values_to_update[odoo_field] = value + values_to_update[key] = value if values_to_update: packaging.write(values_to_update) @@ -174,7 +164,7 @@ def set_packaging_dimension(self): "type": "float", "nullable": True, }, - "length": { + "packaging_length": { "coerce": to_float, "required": False, "type": "float", diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index edf63517776..ffa4edf6eea 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -206,7 +206,7 @@ def test_set_multiple_packaging_dimension(self): "selected_line_id": line.id, "packaging_id": self.product_c_packaging.id, "height": 55, - "length": 233, + "packaging_length": 233, }, ) self.assertEqual(self.product_c_packaging.height, 55) diff --git a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js index 5b0be4f6745..41638f8bac2 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js +++ b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js @@ -45,7 +45,7 @@ const new_template = type="number" :suffix="state.data.packaging.length_uom_name" placeholder="Packaging Length" - v-model="state.data.packaging.length_input" + v-model="state.data.packaging.packaging_length_input" > @@ -105,7 +105,7 @@ const ReceptionPackageDimension = process_registry.extend("reception", { template: new_template, "methods.get_packaging_measurements_inputs": function () { return [ - "length_input", + "packaging_length_input", "width_input", "height_input", "weight_input", @@ -135,11 +135,11 @@ const ReceptionPackageDimension = process_registry.extend("reception", { klass: _is_field_changed("qty") ? "accent" : "", }, { - path: "length", + path: "packaging_length", label: "Length", - klass: _is_field_changed("length") ? "accent" : "", + klass: _is_field_changed("packaging_length") ? "accent" : "", renderer: function (rec, field) { - const value = _.result(rec, "length", ""); + const value = _.result(rec, "packaging_length", ""); const uom = _.result(rec, "length_uom_name", ""); return value + " " + uom; }, From 59d9d43b0af6d5181d46a6e8e318edbc14ef0333 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Mon, 23 Feb 2026 08:36:30 +0100 Subject: [PATCH 40/43] [REF] shopfloor_reception_packaging_dimension: avoid redundant writes Optimize the packaging dimension update logic to skip writing values that are already present in the database. --- .../services/reception.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shopfloor_reception_packaging_dimension/services/reception.py b/shopfloor_reception_packaging_dimension/services/reception.py index c68e609d5ec..f44a671ddce 100644 --- a/shopfloor_reception_packaging_dimension/services/reception.py +++ b/shopfloor_reception_packaging_dimension/services/reception.py @@ -136,11 +136,15 @@ def _check_dimension_to_update(self, dimensions): def _update_packaging_dimension(self, packaging, dimensions_to_update): """Update dimension on the packaging.""" values_to_update = {} + packaging_values = packaging.read(dimensions_to_update.keys())[0] for key, value in dimensions_to_update.items(): if value is None: continue - values_to_update[key] = value + # Skip updating fields with unchanged values to prevent unnecessary + # triggers of compute methods or other side effects + if packaging_values[key] != value: + values_to_update[key] = value if values_to_update: packaging.write(values_to_update) From a3b245c8c3b34a1727600b29524c2da966652dd3 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Mon, 23 Feb 2026 08:49:39 +0100 Subject: [PATCH 41/43] [IMP] shopfloor_reception_packaging_dimension: add test case for skipping dimensions --- .../tests/test_set_package_dimension.py | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py index ffa4edf6eea..41360e23221 100644 --- a/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py +++ b/shopfloor_reception_packaging_dimension/tests/test_set_package_dimension.py @@ -241,5 +241,32 @@ def test_set_multiple_packaging_dimension(self): message=self.msg_store.packaging_updated(self.product_c_packaging_2), ) - # TODO: Test that skipping dimension entry (skip=True) for one packaging - # correctly transitions to the next pending packaging without saving changes. + def test_skip_packaging_dimension_skips_to_next(self): + line = self.picking.move_line_ids.filtered( + lambda li: li.product_id == self.product_c + ) + original_height = self.product_c_packaging.height + + response = self.service.dispatch( + "set_packaging_dimension", + params={ + "picking_id": self.picking.id, + "selected_line_id": line.id, + "packaging_id": self.product_c_packaging.id, + "height": 999.0, # This value should be ignored + "skip": True, + }, + ) + + self.assertEqual( + self.product_c_packaging.height, + original_height, + "Packaging height should not change when skipped", + ) + self._assert_response_set_dimension( + response, + self.picking, + line, + self.product_c_packaging_2, + message=None, # No 'Updated' message should be returned when skipping + ) From 1ac4125467362ca97527ecfb76cce806de332ee3 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Mon, 30 Mar 2026 12:24:55 +0200 Subject: [PATCH 42/43] [IMP] shopfloor_reception_packaging_dimension_mobile: pre-fill form input with db values --- .../scenario/reception_packaging_dimension.js | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js index 41638f8bac2..845b7a0e767 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js +++ b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js @@ -101,8 +101,30 @@ const new_template = // Extend the reception scenario with : // - the new patched template // - the js code for the new state +const baseWatchers = reception_scenario.component.watch || {}; const ReceptionPackageDimension = process_registry.extend("reception", { template: new_template, + watch: { + ...baseWatchers, + "state.key": function (newState) { + if (newState === "set_packaging_dimension") { + this.prefill_packaging_form_inputs(); + } + }, + }, + "methods.prefill_packaging_form_inputs": function () { + if (!this.state_is("set_packaging_dimension")) return; + + const pkg = this.state.data.packaging; + const input_fields = this.get_packaging_measurements_inputs(); + + input_fields.forEach((inputKey) => { + const originalKey = inputKey.replace("_input", ""); + if (pkg[inputKey] === undefined || pkg[inputKey] === null) { + this.$set(pkg, inputKey, pkg[originalKey]); + } + }); + }, "methods.get_packaging_measurements_inputs": function () { return [ "packaging_length_input", @@ -180,6 +202,10 @@ const ReceptionPackageDimension = process_registry.extend("reception", { }, "methods._get_states": function () { let states = _get_states.bind(this)(); + + // Capture 'this' in a variable to be safe across async boundaries + const self = this; + states["set_packaging_dimension"] = { display_info: { title: "Set packaging dimension", @@ -199,14 +225,20 @@ const ReceptionPackageDimension = process_registry.extend("reception", { } return values; }, - on_skip: () => { - const payload = this.state.get_payload_set_packaging_dimension(); + on_skip: async function () { + const payload = self.state.get_payload_set_packaging_dimension(); payload["skip"] = true; - this.wait_call(this.odoo.call("set_packaging_dimension", payload)); + await self.wait_call( + self.odoo.call("set_packaging_dimension", payload) + ); + self.prefill_packaging_form_inputs(); }, - on_done: () => { - const payload = this.state.get_payload_set_packaging_dimension(); - this.wait_call(this.odoo.call("set_packaging_dimension", payload)); + on_done: async function () { + const payload = self.state.get_payload_set_packaging_dimension(); + await self.wait_call( + self.odoo.call("set_packaging_dimension", payload) + ); + self.prefill_packaging_form_inputs(); }, }; return states; From eb8e3653345b60e337e34959c76486e5d69f84d2 Mon Sep 17 00:00:00 2001 From: Nicolas Delbovier Date: Wed, 8 Apr 2026 11:04:24 +0200 Subject: [PATCH 43/43] [REF] shopfloor_reception_packaging_dimension_mobile: refactor methods definition The previous implementation used flattened string keys (e.g., "methods.name") to define scenario methods. While functional, this is less idiomatic and prevents editor support --- .../scenario/reception_packaging_dimension.js | 251 +++++++++--------- 1 file changed, 127 insertions(+), 124 deletions(-) diff --git a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js index 845b7a0e767..04edb4bc006 100644 --- a/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js +++ b/shopfloor_reception_packaging_dimension_mobile/static/src/scenario/reception_packaging_dimension.js @@ -6,7 +6,6 @@ import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js"; const reception_scenario = process_registry.get("reception"); -const _get_states = reception_scenario.component.methods._get_states; // Get the original template of the reception scenario const template = reception_scenario.component.template; // And inject the new state template (for this module) into it @@ -75,7 +74,6 @@ const new_template = v-model="state.data.packaging.weight_input" > - @@ -101,7 +99,9 @@ const new_template = // Extend the reception scenario with : // - the new patched template // - the js code for the new state +const _get_states_base = reception_scenario.component.methods._get_states; const baseWatchers = reception_scenario.component.watch || {}; +const baseMethods = reception_scenario.component.methods || {}; const ReceptionPackageDimension = process_registry.extend("reception", { template: new_template, watch: { @@ -112,136 +112,139 @@ const ReceptionPackageDimension = process_registry.extend("reception", { } }, }, - "methods.prefill_packaging_form_inputs": function () { - if (!this.state_is("set_packaging_dimension")) return; + methods: { + ...baseMethods, + prefill_packaging_form_inputs: function () { + if (!this.state_is("set_packaging_dimension")) return; - const pkg = this.state.data.packaging; - const input_fields = this.get_packaging_measurements_inputs(); + const pkg = this.state.data.packaging; + const input_fields = this.get_packaging_measurements_inputs(); - input_fields.forEach((inputKey) => { - const originalKey = inputKey.replace("_input", ""); - if (pkg[inputKey] === undefined || pkg[inputKey] === null) { - this.$set(pkg, inputKey, pkg[originalKey]); - } - }); - }, - "methods.get_packaging_measurements_inputs": function () { - return [ - "packaging_length_input", - "width_input", - "height_input", - "weight_input", - "qty_input", - "barcode_input", - ]; - }, - "methods.packaging_detail_options": function () { - const pkg = this.state.data.packaging; - const _is_field_changed = (fieldName) => { - const inputKey = fieldName + "_input"; - return pkg[inputKey] && pkg[inputKey] != pkg[fieldName]; - }; - const options = { - main: true, - key_title: "name", - title_icon: "mdi-package-variant", - fields: [ - { - path: "barcode", - label: "Barcode", - klass: _is_field_changed("barcode") ? "accent" : "", - }, - { - path: "qty", - label: "Quantity", - klass: _is_field_changed("qty") ? "accent" : "", - }, - { - path: "packaging_length", - label: "Length", - klass: _is_field_changed("packaging_length") ? "accent" : "", - renderer: function (rec, field) { - const value = _.result(rec, "packaging_length", ""); - const uom = _.result(rec, "length_uom_name", ""); - return value + " " + uom; + input_fields.forEach((inputKey) => { + const originalKey = inputKey.replace("_input", ""); + if (pkg[inputKey] === undefined || pkg[inputKey] === null) { + this.$set(pkg, inputKey, pkg[originalKey]); + } + }); + }, + get_packaging_measurements_inputs: function () { + return [ + "packaging_length_input", + "width_input", + "height_input", + "weight_input", + "qty_input", + "barcode_input", + ]; + }, + packaging_detail_options: function () { + const pkg = this.state.data.packaging; + const _is_field_changed = (fieldName) => { + const inputKey = fieldName + "_input"; + return pkg[inputKey] && pkg[inputKey] != pkg[fieldName]; + }; + const options = { + main: true, + key_title: "name", + title_icon: "mdi-package-variant", + fields: [ + { + path: "barcode", + label: "Barcode", + klass: _is_field_changed("barcode") ? "accent" : "", }, - }, - { - path: "width", - label: "Width", - klass: _is_field_changed("width") ? "accent" : "", - renderer: function (rec, field) { - const value = _.result(rec, "width", ""); - const uom = _.result(rec, "length_uom_name", ""); - return value + " " + uom; + { + path: "qty", + label: "Quantity", + klass: _is_field_changed("qty") ? "accent" : "", }, - }, - { - path: "height", - label: "Height", - klass: _is_field_changed("height") ? "accent" : "", - renderer: function (rec, field) { - const value = _.result(rec, "height", ""); - const uom = _.result(rec, "length_uom_name", ""); - return value + " " + uom; + { + path: "packaging_length", + label: "Length", + klass: _is_field_changed("packaging_length") ? "accent" : "", + renderer: function (rec, field) { + const value = _.result(rec, "packaging_length", ""); + const uom = _.result(rec, "length_uom_name", ""); + return value + " " + uom; + }, }, - }, - { - path: "weight", - label: "Weight", - klass: _is_field_changed("weight") ? "accent" : "", - renderer: function (rec, field) { - const value = _.result(rec, "weight", ""); - const uom = _.result(rec, "weight_uom_name", ""); - return value + " " + uom; + { + path: "width", + label: "Width", + klass: _is_field_changed("width") ? "accent" : "", + renderer: function (rec, field) { + const value = _.result(rec, "width", ""); + const uom = _.result(rec, "length_uom_name", ""); + return value + " " + uom; + }, }, - }, - ], - }; - return options; - }, - "methods._get_states": function () { - let states = _get_states.bind(this)(); + { + path: "height", + label: "Height", + klass: _is_field_changed("height") ? "accent" : "", + renderer: function (rec, field) { + const value = _.result(rec, "height", ""); + const uom = _.result(rec, "length_uom_name", ""); + return value + " " + uom; + }, + }, + { + path: "weight", + label: "Weight", + klass: _is_field_changed("weight") ? "accent" : "", + renderer: function (rec, field) { + const value = _.result(rec, "weight", ""); + const uom = _.result(rec, "weight_uom_name", ""); + return value + " " + uom; + }, + }, + ], + }; + return options; + }, + _get_states: function () { + let states = _get_states_base.bind(this)(); - // Capture 'this' in a variable to be safe across async boundaries - const self = this; + // Capture 'this' in a variable to be safe across async boundaries + const self = this; - states["set_packaging_dimension"] = { - display_info: { - title: "Set packaging dimension", - }, - events: { - go_back: "on_back", - }, - get_payload_set_packaging_dimension: () => { - let values = { - picking_id: this.state.data.picking.id, - selected_line_id: this.state.data.selected_move_line.id, - packaging_id: this.state.data.packaging.id, - }; - for (const measurement of this.get_packaging_measurements_inputs()) { - values[measurement.replace("_input", "")] = - this.state.data.packaging[measurement]; - } - return values; - }, - on_skip: async function () { - const payload = self.state.get_payload_set_packaging_dimension(); - payload["skip"] = true; - await self.wait_call( - self.odoo.call("set_packaging_dimension", payload) - ); - self.prefill_packaging_form_inputs(); - }, - on_done: async function () { - const payload = self.state.get_payload_set_packaging_dimension(); - await self.wait_call( - self.odoo.call("set_packaging_dimension", payload) - ); - self.prefill_packaging_form_inputs(); - }, - }; - return states; + states["set_packaging_dimension"] = { + display_info: { + title: "Set packaging dimension", + }, + events: { + go_back: "on_back", + }, + get_payload_set_packaging_dimension: () => { + let values = { + picking_id: this.state.data.picking.id, + selected_line_id: this.state.data.selected_move_line.id, + packaging_id: this.state.data.packaging.id, + }; + for (const measurement of this.get_packaging_measurements_inputs()) { + values[measurement.replace("_input", "")] = + this.state.data.packaging[measurement]; + } + return values; + }, + on_skip: async function () { + const payload = self.state.get_payload_set_packaging_dimension(); + payload["skip"] = true; + await self.wait_call( + self.odoo.call("set_packaging_dimension", payload) + ); + self.prefill_packaging_form_inputs(); + }, + on_done: async function () { + const payload = self.state.get_payload_set_packaging_dimension(); + await self.wait_call( + self.odoo.call("set_packaging_dimension", payload) + ); + self.prefill_packaging_form_inputs(); + }, + }; + return states; + }, }, });