2a07d7b8f9c0321934b1caf45a7a4a6a15c60e98
Steps to reproduce the bug: - Let's consider a consumable product P with a subcontracted BOM B - Let's consider that B is subcontracted by a partner S and B has a storable component C - C has the route Resupply Subcontractor on Order and has a partner SUP as supplier - Create a purchase order PO with 1 P to S and confirm PO - A delivery order DO1 is created with C to S - Change the ordered quantity on PO and set 2 instead of 1 Bug: DO1 was canceled and a new delivery order DO2 was created with only 1 C instead of 2 It happens due to merge move, when updating the PO line a new rule is trigger and create the object in this order: - Move Sub-Stock(finished) -> Subcontract Order -> Move Stock-Sub(comp) Then the action_confirm is trigger and will run _merge_move on object from left to right order. But when the move Sub-Stock is merged, everything is write in the first move and the new move is unlink. It result by canceling all the following object (so the new subcontractor and the Move Stock-Sub). It was not an issue for the subcontracting since the write of stock.move is overridden in order to update the order quantity when the move quantity is updated. However in this case the rule are not triggered in order to create the moves that ressuply the subcontractor. In order to avoid this mess, this PR prevent the merge in case of a subcontracting move. opw-2419222 closes odoo/odoo#69553 X-original-commit: c6447e724b9df3c25c5a5306fc902dfc5dcd6bb8 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com> Co-authored-by: simongoffin <sig@odoo.com>
…
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%