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
1 change: 1 addition & 0 deletions shopfloor_single_product_transfer/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Contributors

- Matthieu Méquignon <matthieu.mequignon@camptocamp.com>
- Michael Tietz (MT Software) <mtietz@mt-software.de>
- Laurent Mignon (ACSONE SA/NV) <laurent.mignon@acsone.eu>

Design
~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion shopfloor_single_product_transfer/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Shopfloor Single Product Transfer",
"summary": "Move an item from one location to another.",
"version": "16.0.1.0.0",
"version": "16.0.2.0.0",
"category": "Inventory",
"website": "https://github.com/OCA/wms",
"author": "Camptocamp, BCIM, Odoo Community Association (OCA)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<field name="options_edit">
{
"allow_create_moves": true,
"allow_get_work": true,
"allow_move_line_search_sort_order": true,
"allow_move_line_search_additional_domain": true,
"scan_location_or_pack_first": true,
"allow_unreserve_other_moves": true,
"allow_ignore_no_putaway_available": true,
"allow_alternative_destination": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2026 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import json
import logging

from odoo import SUPERUSER_ID, api

_logger = logging.getLogger(__name__)


def migrate(cr, version):
_logger.info("Updating scenario options for shopfloor_single_product_transfer")
if not version:
return
env = api.Environment(cr, SUPERUSER_ID, {})
single_product_transfer_scenario = env.ref(
"shopfloor_single_product_transfer.scenario_single_product_transfer"
)
_update_scenario_options(single_product_transfer_scenario)


def _update_scenario_options(scenario):
options = scenario.options
if "allow_get_work" not in options:
options["allow_get_work"] = True
_logger.info("Option allow_get_work added to scenario %s", scenario.name)
if "allow_move_line_search_sort_order" not in options:
options["allow_move_line_search_sort_order"] = True
options["allow_move_line_search_additional_domain"] = True
_logger.info(
"Option allow_alternative_destination_package added to scenario %s",
scenario.name,
)
if "scan_location_or_pack_first" not in options:
options["scan_location_or_pack_first"] = True
_logger.info(
"Option scan_location_or_pack_first added to scenario %s", scenario.name
)
options_edit = json.dumps(options or {}, indent=4, sort_keys=True)
scenario.write({"options_edit": options_edit})
1 change: 1 addition & 0 deletions shopfloor_single_product_transfer/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- Matthieu Méquignon \<<matthieu.mequignon@camptocamp.com>\>
- Michael Tietz (MT Software) \<<mtietz@mt-software.de>\>
- Laurent Mignon (ACSONE SA/NV) \<<laurent.mignon@acsone.eu>\>

## Design

Expand Down
Loading
Loading