Skip to content

[18.0][ADD] stock_picking_type_restrict_location - #2589

Open
JoanSForgeFlow wants to merge 1 commit into
OCA:18.0from
ForgeFlow:18.0-add-stock_picking_type_restrict_location
Open

JoanSForgeFlow wants to merge 1 commit into
OCA:18.0from
ForgeFlow:18.0-add-stock_picking_type_restrict_location

Conversation

@JoanSForgeFlow

Copy link
Copy Markdown

Operation types have a default source and destination location, but the locations of a transfer can be changed freely afterwards, so a transfer can end up moving stock between locations that have nothing to do with its operation type.

This module adds a Restrict Location option on operation types (receipts, deliveries and internal transfers). On the transfers of a restricted operation type:

  • The source and the destination must be the default locations of the operation type or one of their sublocations. The location fields only offer those, and a transfer that gets other locations by any other means (rules, imports, code) is rejected.
  • A side whose default location is a vendor or customer location is not restricted.
  • A return created from a transfer can go back the way that transfer came, but cannot be diverted elsewhere.

To keep the configuration consistent, the option cannot be enabled, and the locations of a restricted operation type cannot be changed, while transfers in progress or active rules of that operation type use other locations. The same checks run on the rules and at the end of a warehouse reconfiguration.

An Unrestricted Locations filter in the operation types list shows the ones that are not restricted.

@OCA-git-bot OCA-git-bot added series:18.0 mod:stock_picking_type_restrict_location Module stock_picking_type_restrict_location labels Nov 26, 2026
@JoanSForgeFlow
JoanSForgeFlow force-pushed the 18.0-add-stock_picking_type_restrict_location branch 2 times, most recently from baaae09 to 075e3e9 Compare November 26, 2026 14:59
@JoanSForgeFlow
JoanSForgeFlow force-pushed the 18.0-add-stock_picking_type_restrict_location branch from 075e3e9 to c0e44bb Compare December 3, 2026 14:13
@JoanSForgeFlow JoanSForgeFlow changed the title [WIP][18.0][ADD] stock_picking_type_restrict_location [18.0][ADD] stock_picking_type_restrict_location Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:stock_picking_type_restrict_location Module stock_picking_type_restrict_location series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants