diff --git a/setup/shopfloor_fs_product_multi_image/odoo/addons/shopfloor_fs_product_multi_image b/setup/shopfloor_fs_product_multi_image/odoo/addons/shopfloor_fs_product_multi_image new file mode 120000 index 0000000000..3d3e8bc1dc --- /dev/null +++ b/setup/shopfloor_fs_product_multi_image/odoo/addons/shopfloor_fs_product_multi_image @@ -0,0 +1 @@ +../../../../shopfloor_fs_product_multi_image \ No newline at end of file diff --git a/setup/shopfloor_fs_product_multi_image/setup.py b/setup/shopfloor_fs_product_multi_image/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/shopfloor_fs_product_multi_image/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/shopfloor_fs_product_multi_image/README.rst b/shopfloor_fs_product_multi_image/README.rst new file mode 100644 index 0000000000..8effd09403 --- /dev/null +++ b/shopfloor_fs_product_multi_image/README.rst @@ -0,0 +1,85 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +================================ +Shopfloor Fs Product Multi Image +================================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:312fa450024b223717bd3e705b45d3df485e80242f7ae5f8f8080bf7f8971dc9 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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 + :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/16.0/shopfloor_fs_product_multi_image + :alt: OCA/wms +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_fs_product_multi_image + :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=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This is a technical module aiming at fixing incompatibility issue +between shopfloor and fs_product_multi_image. + +Without this glue module, your product images would not load correctly +in shopfloor if you were to have the fs_product_multi_image module +installed. + +**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 +------- + +* ACSONE SA/NV + +Contributors +------------ + +- Nicolas Delbovier nicolas.delbovier@acsone.eu (https://www.acsone.eu/) + +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_fs_product_multi_image/__init__.py b/shopfloor_fs_product_multi_image/__init__.py new file mode 100644 index 0000000000..f5fe63aaf7 --- /dev/null +++ b/shopfloor_fs_product_multi_image/__init__.py @@ -0,0 +1 @@ +from . import actions diff --git a/shopfloor_fs_product_multi_image/__manifest__.py b/shopfloor_fs_product_multi_image/__manifest__.py new file mode 100644 index 0000000000..b63bf1046f --- /dev/null +++ b/shopfloor_fs_product_multi_image/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2026 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Shopfloor Fs Product Multi Image", + "summary": """Glue module between shopfloor and fs_product_multi_image to ensure + images load correctly in shopfloor screens when using fs_product_multi_image.""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/wms", + "depends": ["shopfloor", "shopfloor_reception", "fs_product_multi_image"], + "data": [], + "demo": [], + "auto_install": True, +} diff --git a/shopfloor_fs_product_multi_image/actions/__init__.py b/shopfloor_fs_product_multi_image/actions/__init__.py new file mode 100644 index 0000000000..fb705c0a26 --- /dev/null +++ b/shopfloor_fs_product_multi_image/actions/__init__.py @@ -0,0 +1,3 @@ +from . import data_detail +from . import data +from . import utils diff --git a/shopfloor_fs_product_multi_image/actions/data.py b/shopfloor_fs_product_multi_image/actions/data.py new file mode 100644 index 0000000000..2314c26ff8 --- /dev/null +++ b/shopfloor_fs_product_multi_image/actions/data.py @@ -0,0 +1,17 @@ +# Copyright 2026 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.addons.component.core import Component + +from .utils import _replace_image_fields + + +class DataAction(Component): + _inherit = "shopfloor.data.action" + + @property + def _product_parser(self): + res = super(DataAction, self)._product_parser + data_detail_action = self._actions_for("data_detail") + + return _replace_image_fields(res, data_detail_action._product_image_url) diff --git a/shopfloor_fs_product_multi_image/actions/data_detail.py b/shopfloor_fs_product_multi_image/actions/data_detail.py new file mode 100644 index 0000000000..2ebe855462 --- /dev/null +++ b/shopfloor_fs_product_multi_image/actions/data_detail.py @@ -0,0 +1,17 @@ +# Copyright 2026 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from odoo.addons.component.core import Component + +from .utils import _replace_image_fields + + +class DataDetailAction(Component): + _inherit = "shopfloor.data.detail.action" + + @property + def _product_detail_parser(self): + res = super(DataDetailAction, self)._product_detail_parser + + return _replace_image_fields(res, self._product_image_url) diff --git a/shopfloor_fs_product_multi_image/actions/utils.py b/shopfloor_fs_product_multi_image/actions/utils.py new file mode 100644 index 0000000000..5ff6233995 --- /dev/null +++ b/shopfloor_fs_product_multi_image/actions/utils.py @@ -0,0 +1,25 @@ +# Copyright 2026 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + + +def _replace_image_fields(parser_res, image_url_provider): + # If fs_product_multi_image is installed, we should use "image" and "image_medium" + # fieds and not base "image_x" fields + res = [ + item + for item in parser_res + if not ( + # If it's a tuple/list, check the first element + ( + isinstance(item, (tuple, list)) + and item + and isinstance(item[0], str) + and (item[0].endswith("image") or ":image" in item[0]) + ) + # If it's just a raw string, check the string itself + or (isinstance(item, str) and (item.startswith("image"))) + ) + ] + + res.append(("image_medium:image", image_url_provider)) + return res diff --git a/shopfloor_fs_product_multi_image/readme/CONTRIBUTORS.md b/shopfloor_fs_product_multi_image/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..e0604c970f --- /dev/null +++ b/shopfloor_fs_product_multi_image/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Nicolas Delbovier (https://www.acsone.eu/) \ No newline at end of file diff --git a/shopfloor_fs_product_multi_image/readme/DESCRIPTION.md b/shopfloor_fs_product_multi_image/readme/DESCRIPTION.md new file mode 100644 index 0000000000..796abab850 --- /dev/null +++ b/shopfloor_fs_product_multi_image/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This is a technical module aiming at fixing incompatibility issue between shopfloor and fs_product_multi_image. + +Without this glue module, your product images would not load correctly in shopfloor if you were to have the fs_product_multi_image module installed. \ No newline at end of file diff --git a/shopfloor_fs_product_multi_image/static/description/icon.png b/shopfloor_fs_product_multi_image/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/shopfloor_fs_product_multi_image/static/description/icon.png differ diff --git a/shopfloor_fs_product_multi_image/static/description/index.html b/shopfloor_fs_product_multi_image/static/description/index.html new file mode 100644 index 0000000000..b71824b3d2 --- /dev/null +++ b/shopfloor_fs_product_multi_image/static/description/index.html @@ -0,0 +1,433 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Shopfloor Fs Product Multi Image

+ +

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

+

This is a technical module aiming at fixing incompatibility issue +between shopfloor and fs_product_multi_image.

+

Without this glue module, your product images would not load correctly +in shopfloor if you were to have the fs_product_multi_image module +installed.

+

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

+
    +
  • ACSONE SA/NV
  • +
+
+ +
+

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.

+

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/actions/data.py b/shopfloor_reception/actions/data.py index 64b4874142..99a656ceea 100644 --- a/shopfloor_reception/actions/data.py +++ b/shopfloor_reception/actions/data.py @@ -15,7 +15,11 @@ def _product_parser(self): parser functions. We use *args to capture them. """ res = super(DataAction, self)._product_parser - return res + ["use_expiration_date"] + data_detail_action = self._actions_for("data_detail") + return res + [ + "use_expiration_date", + ("image_256:image", data_detail_action._product_image_url), + ] @property def _lot_parser_reception(self): diff --git a/shopfloor_reception/actions/schema.py b/shopfloor_reception/actions/schema.py index 6453b43d53..ea1b92c55f 100644 --- a/shopfloor_reception/actions/schema.py +++ b/shopfloor_reception/actions/schema.py @@ -15,6 +15,7 @@ def product(self): "nullable": True, "required": False, }, + "image": {"type": "string", "nullable": True, "required": False}, } ) return res diff --git a/shopfloor_reception_mobile/static/src/scenario/reception.js b/shopfloor_reception_mobile/static/src/scenario/reception.js index 51d7f8420b..899d076f88 100644 --- a/shopfloor_reception_mobile/static/src/scenario/reception.js +++ b/shopfloor_reception_mobile/static/src/scenario/reception.js @@ -117,6 +117,9 @@ const Reception = { :card_color="is_set_lot_possible() ? utils.colors.color_for('screen_step_done') : utils.colors.color_for('screen_step_todo')" :key="make_state_component_key(['reception-product-item-detail-set-lot', state.data.picking.id])" /> +
+ +