Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions setup/shopfloor_fs_product_multi_image/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
85 changes: 85 additions & 0 deletions shopfloor_fs_product_multi_image/README.rst
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/OCA/wms/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 <https://github.com/OCA/wms/issues/new?body=module:%20shopfloor_fs_product_multi_image%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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 <https://github.com/OCA/wms/tree/16.0/shopfloor_fs_product_multi_image>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions shopfloor_fs_product_multi_image/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import actions
16 changes: 16 additions & 0 deletions shopfloor_fs_product_multi_image/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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,
}
3 changes: 3 additions & 0 deletions shopfloor_fs_product_multi_image/actions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import data_detail
from . import data
from . import utils
17 changes: 17 additions & 0 deletions shopfloor_fs_product_multi_image/actions/data.py
Original file line number Diff line number Diff line change
@@ -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)
17 changes: 17 additions & 0 deletions shopfloor_fs_product_multi_image/actions/data_detail.py
Original file line number Diff line number Diff line change
@@ -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)
25 changes: 25 additions & 0 deletions shopfloor_fs_product_multi_image/actions/utils.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions shopfloor_fs_product_multi_image/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Nicolas Delbovier <nicolas.delbovier@acsone.eu> (https://www.acsone.eu/)
3 changes: 3 additions & 0 deletions shopfloor_fs_product_multi_image/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading