Adrien Widart (awt) 7b4b835465 [FIX] stock: apply putaway on package with one product category
When applying the putaway rules, if we redirect a package (with a
specific type), we don't check the category of the package products.

To reproduce the issue:
1. In Settings, enable
   - Packages
   - Multi-Step Routes
   - Storage Categories
2. Edit the warehouse:
   - Receipt: 2 steps
3. Create three categories C1, C2, C3
   - Parent: All
4. Create three locations L1, L2, L3
   - Parent: WH/Stock
5. For each location Lx, create a putaway rules PRx:
   - From: WH/Stock
   - Category: Cx
   - To: Lx
6. Create a product P
   - Type: Storable
   - Category: C2
7. Create a planned receipt R with 1 x P
8. Mark it as todo, set the done quantity and put it in pack
9. Set a type on the package
10. Mark R as done
11. Open the associated internal transfer

Error: the destination location of the package is not L2 -> an
incorrect putaway rule has been applied

When we try to apply the PR on the SML "input to stock", because
this is a package with a type, we don't provide the list of the
products. Therefore, we have no idea about the product category.
This is a shame in case of a package that contains some products of
the same category. We should be able to apply the putaway rules
related to that category.

Moreover, this commit also fixes two other issues explained in [1]
and [2]. The FW of these commits have been stopped for the current
one because they didn't fix the above use case. Moreover, this commit
simplifies/clarifies the filtering and sorting of all putaway rules

[1] 03e47b165e7f6c59b41509d9229e8e2074aa3f34
[2] e0098eb281d886797a888a6f8fac474bbacb1b09

OPW-3098452

X-original-commit: c99523bc3a4a5a335f1928cf9bb53bb8483b492e
Part-of: odoo/odoo#109669
2023-01-12 08:02:47 +01:00
2022-12-13 17:03:17 +01:00
2023-01-03 13:16:02 +01:00
2023-01-06 14:31:50 +01:00
2023-01-03 13:16:02 +01:00
…
…
…
…
2023-01-03 13:16:02 +01:00
2023-01-03 13:16:02 +01:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%