Anh Thao Pham (pta) 0a4ac677d9 [FIX] stock: fix reservation on multiple moves when validating a picking
Steps to reproduce:
- Activate developer mode
- Install Inventory and Sales
- Go to "Inventory / Configuration / Settings"
- Activate "Storage Locations" and "Multi-Steps Routes"
- Go to "Inventory / Configuration / Warehouse Management / Warehouses"
- Configure main warehouse: (e.g. San Francisco warehouse)
  * Outgoing Shipments: Send goods in output and then deliver (2 steps)
- Go to "Inventory / Configuration / Warehouse Management / Rules"
- Open the following rule:
  * Action: Pull From
  * Source Location: WH/Stock
  * Destination Location: WH/Output
  * Route: San Francisco: Deliver in 2 steps (pick + ship)
- Configure the rule:
  * Propagation of Procurement Group: Fixed
  * Fixed Procurement Group: [create a new one]
- Create a storable product (e.g. Product X)
- Update its quantity (e.g. 3) and apply
- Create a SO with 2 Product X and confirm
- Go to "Inventory / Operations / Transfers"
- Open the pick move linked to the SO (e.g. WH/PICK/00001)
- Set done quantity to 1 and validate
- Create a backorder for the remaining quantity (e.g. WH/PICK/00002)
- Create another SO with 1 Product X and confirm
=> Its pick move is merged with WH/PICK/00002, which contains now 2 Product X
- Open WH/PICK/00002, set done quantity to 2 and validate

Issue:
When validating WH/PICK/00002, the products should be reserved in the delivery moves
of both SO, but it is only done for the first one, leaving the second one in the
"Waiting Another Operation" state.

Cause:
When validating a move (i.e. WH/PICK/00002) linked to several destination moves,
the destination moves are reserved by checking the availability of the product.
For the first destination move, its origin moves are WH/PICK/00001 and WH/PICK/00002,
having an IN value of 3 and an OUT value of 2, which is correct.
When checking the availability of the second destination move, its origin move is
WH/PICK/00002, having an IN value of 2, but for the OUT value, the first destination move
is taken into account, generating an OUT value of 3.

Solution:
When computing the availability, if the origin move is linked to several destination
moves, it should take all the origin moves of all the destination moves into account.

opw-3548123

closes odoo/odoo#149867

X-original-commit: 0c8f0d14d29117e689d8e4c3331bc90b29ab1b98
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2024-01-18 10:28:46 +00:00
2024-01-16 09:55:28 +00:00
2024-01-16 22:40:02 +00: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%