Adrien Widart (awt) 1a0787062d [FIX] {sale_,}stock: decrease SOL qty with existing backorders
2-steps delivery. If there is already a backorder for the picking
out->customer, when decreasing the SOL qty, an unexpected picking
will be created

To reproduce the error:
1. In Settings, enable "Multi-Step Routes"
2. Edit the warehouse:
   - Outgoing: 2 steps
3. Create a storable product P
4. Update the on hand qty:
   - 10 x P at WH/Stock
5. Create and confirm a SO with 10 x P
6. Process the pickings with 6 x P (with backorders)
   - There should be 4 pickings
7. On the SO, decrease the quantity to 7

Error: an unexpected picking (customer -> out) is created for 3 x P

Step 6, when creating a backorder for 4 x P from out to customer,
we split the initial SM, and we force the `procure_method` to
`make_to_stock`
Step 7, when decreasing the qty, we create a negative procurement
and run the rules' system. Because of warehouse configuration, the
rule that links output location and customer one is based on an MTO
logic: the SM for -3 x P has the `procure_method` set to
`make_to_order`. As a result, that move will not be merged with the
one created during the split (step 6) and we will create the
unexpected picking for the move.

The SM generated by the split should keep the same procure method
logic as the initial one.

OPW-3141387

closes odoo/odoo#114787

X-original-commit: 920924e963d389ab2f962e0fe45ef229641d00c4
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-03-09 15:55:07 +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%