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
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,
)
129 changes: 129 additions & 0 deletions shopfloor_single_product_transfer_full_reservation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==================================================
Shopfloor Single Product Transfer Full Reservation
==================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:512d9cce3c579f9c8f6178efd6ea19d223e054bf127d38d76e5185450b7cbfbb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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_single_product_transfer_full_reservation
: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_single_product_transfer_full_reservation
: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 module extends the *Single Product Transfer* shopfloor scenario
with support for the *Full Location Reservation* feature.

When the **Process full location reservation** option is enabled on the
shopfloor menu, the system automatically extends the reservation each
time the operator is assigned a move line to work on. The reservation is
expanded to cover all available quantity sharing the same product, lot,
package, and owner at the source location — not just the quantity
originally requested.

This allows operators to clear a source location in a single pass
without having to process the remaining quantity through separate
operations.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

The *Single Product Transfer* scenario is designed for picking
operations where operators process one product at a time: they scan a
source location or package, scan a product, enter the quantity, and
confirm the destination. By default, the move lines are limited to
exactly the quantities already reserved in the stock operations.

In some warehouse workflows — such as quality control restocking,
inventory consolidation, or location clearance — operators must move the
entire available quantity of a product from a source location in one go,
even when the original picking only reserved part of it. The
``stock_full_location_reservation`` module provides the underlying
mechanism to extend a stock reservation to the full available content of
a location.

The ``shopfloor_full_location_reservation`` module exposes that
mechanism as a per-menu option (*Process full location reservation*) for
shopfloor scenarios. However, because the *Single Product Transfer*
scenario works line by line and filters by product/lot/package/owner, a
plain full-location reservation (which would capture every product in
the location) is too coarse.

This module bridges the gap: it hooks into
``_get_next_move_line_to_work`` and, when the option is active, triggers
a **strict** full location reservation scoped to the exact product, lot,
package, and owner of the assigned move line.

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_single_product_transfer_full_reservation%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
------------

- Laurent Mignon laurent.mignon@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.

.. |maintainer-lmignon| image:: https://github.com/lmignon.png?size=40px
:target: https://github.com/lmignon
:alt: lmignon

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-lmignon|

This module is part of the `OCA/wms <https://github.com/OCA/wms/tree/16.0/shopfloor_single_product_transfer_full_reservation>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import services
from .hooks import post_init_hook
19 changes: 19 additions & 0 deletions shopfloor_single_product_transfer_full_reservation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2026 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Shopfloor Single Product Transfer Full Reservation",
"summary": """Adds a configuration to the single product transfer "
"scenario which allows to trigger the full reservation of product "
"available at location for the selected lot/packaging""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/wms",
"maintainers": ["lmignon"],
"depends": [
"shopfloor_single_product_transfer",
"shopfloor_full_location_reservation",
],
"post_init_hook": "post_init_hook",
}
15 changes: 15 additions & 0 deletions shopfloor_single_product_transfer_full_reservation/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2026 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import json

from odoo import SUPERUSER_ID, api


def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
scenario = env.ref(
"shopfloor_single_product_transfer.scenario_single_product_transfer"
)
options = scenario.options
options["full_location_reservation"] = True
scenario.options_edit = json.dumps(options)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The *Single Product Transfer* scenario is designed for picking operations where
operators process one product at a time: they scan a source location or package,
scan a product, enter the quantity, and confirm the destination. By default, the
move lines are limited to exactly the quantities already reserved in the stock
operations.

In some warehouse workflows — such as quality control restocking, inventory
consolidation, or location clearance — operators must move the entire available
quantity of a product from a source location in one go, even when the original
picking only reserved part of it. The `stock_full_location_reservation` module
provides the underlying mechanism to extend a stock reservation to the full
available content of a location.

The `shopfloor_full_location_reservation` module exposes that mechanism as a
per-menu option (*Process full location reservation*) for shopfloor scenarios.
However, because the *Single Product Transfer* scenario works line by line and
filters by product/lot/package/owner, a plain full-location reservation (which
would capture every product in the location) is too coarse.

This module bridges the gap: it hooks into `_get_next_move_line_to_work` and,
when the option is active, triggers a **strict** full location reservation scoped
to the exact product, lot, package, and owner of the assigned move line.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Laurent Mignon <laurent.mignon@acsone.eu> (https://www.acsone.eu)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This module extends the *Single Product Transfer* shopfloor scenario with support
for the *Full Location Reservation* feature.

When the **Process full location reservation** option is enabled on the shopfloor
menu, the system automatically extends the reservation each time the operator is
assigned a move line to work on. The reservation is expanded to cover all
available quantity sharing the same product, lot, package, and owner at the
source location — not just the quantity originally requested.

This allows operators to clear a source location in a single pass without having
to process the remaining quantity through separate operations.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import single_product_transfer
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2026 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.addons.component.core import Component


class ShopfloorSingleProductTransfer(Component):
_inherit = "shopfloor.single.product.transfer"

def _get_next_move_line_to_work(self):
move_line = super()._get_next_move_line_to_work()
if move_line and self.work.menu.full_location_reservation:
# we want the same product, lot, package and owner as the move line to work on,
# but we want to get all available quantities so use strict=True
move_line._full_location_reservation(
reservation_mode="strict"
).move_line_ids[:1]
return move_line
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading