Skip to content
Snippets Groups Projects
Commit 66c11acd authored by Adrien Widart (awt)'s avatar Adrien Widart (awt)
Browse files

[FIX] stock: ignore locations without storage category


On a putaway rule, the "Having Category" condition is not always
respected.

To reproduce the issue:
1. In Settings, enable:
   - Storage Locations
   - Storage Categories
2. Create a Storage Category SC:
3. Create two locations L1, L2:
   - Parent: WH/Stock
   - Type: Internal
   - L2 only:
     - Storage Category: SC
4. Create a putaway rule:
   - When in: WH/Stock
   - Store to: WH/Stock
   - Having Category: SC
5. Create one storable product
6. Update its on hand quantity:
   - 1 product at L1
7. Create a planned receipt R for one product
8. Mark the receipt as Todo
9. Click on 'Set Quantities'
10. Open the detailed operations

Error: The destination location is L1. The putaway rule has been
applied without the storage category constraint: the destination
location should be L2

When applying the putaway rules, we first check if one of the
relevant locations already contains that product. And, if it's the
case, we use that location as destination location. However, we
don't filter out the locations without the correct storage category.
This explains why L1 is found and used.

OPW-3437174

closes odoo/odoo#130679

Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
parent 95fccaba
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment