diff --git a/shopfloor/actions/data.py b/shopfloor/actions/data.py index 09ead326eb..b5f3e30622 100644 --- a/shopfloor/actions/data.py +++ b/shopfloor/actions/data.py @@ -159,6 +159,7 @@ def _package_level_parser(self): return [ "id", "is_done", + ("picking_id:picking", self._simple_record_parser()), ("package_id:package_src", self._package_parser), ("location_dest_id:location_dest", self._location_parser), ( diff --git a/shopfloor/services/schema.py b/shopfloor/services/schema.py index c7d78c39e3..ac610977ad 100644 --- a/shopfloor/services/schema.py +++ b/shopfloor/services/schema.py @@ -157,6 +157,7 @@ def package_level(self): return { "id": {"required": True, "type": "integer"}, "is_done": {"type": "boolean", "nullable": False, "required": True}, + "picking": self._schema_dict_of(self._simple_record()), "package_src": self._schema_dict_of(self.package()), "location_src": self._schema_dict_of(self.location()), "location_dest": self._schema_dict_of(self.location()), diff --git a/shopfloor/tests/test_actions_data.py b/shopfloor/tests/test_actions_data.py index 4be811ac45..fbd1942025 100644 --- a/shopfloor/tests/test_actions_data.py +++ b/shopfloor/tests/test_actions_data.py @@ -149,6 +149,7 @@ def test_data_package_level(self): expected = { "id": package_level.id, "is_done": False, + "picking": self.picking.jsonify(["id", "name"])[0], "package_src": self._expected_package(package_level.package_id), "location_dest": self._expected_location(package_level.location_dest_id), "location_src": self._expected_location(