Fix warehouse propagation in MTO procurements - #962
Conversation
|
@jcadhoc @les-adhoc cherrypicking of pull request #928 failed. stdout: Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
|
@jcadhoc @les-adhoc this forward port of #928 is awaiting action (not merged or closed). |
9483d58 to
1ac7c2c
Compare
|
@roboadhoc r+ nobump |
Override stock.move._prepare_procurement_values() to propagate the warehouse that owns the physical source location, avoiding stale commercial warehouses being carried into the next procurement in multi-warehouse MTO chains (reuse of draft RFQs from the wrong warehouse / mixed destinations failing the operation type check). Forward-Port-Of: #928 Resolved forward-port conflicts for 19.0: - dropped the _action_assign override (removed in 19.0, folded into _trigger_assign), keeping only _prepare_procurement_values - tests/__init__.py imports only test_mto_warehouse_propagation (test_stock_orderpoint_multiple_over_max is not present in 19.0) - removed name= kwarg in the test (stock.move.name no longer exists in 19.0) closes #962 Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
Override stock.move._prepare_procurement_values() to propagate the warehouse that owns the physical source location, avoiding stale commercial warehouses being carried into the next procurement in multi-warehouse MTO chains (reuse of draft RFQs from the wrong warehouse / mixed destinations failing the operation type check). Forward-Port-Of: ingadhoc#928 Resolved forward-port conflicts for 19.0: - dropped the _action_assign override (removed in 19.0, folded into _trigger_assign), keeping only _prepare_procurement_values - tests/__init__.py imports only test_mto_warehouse_propagation (test_stock_orderpoint_multiple_over_max is not present in 19.0) - removed name= kwarg in the test (stock.move.name no longer exists in 19.0)
1ac7c2c to
d923615
Compare
|
@jcadhoc @les-adhoc this forward port of #928 is awaiting action (not merged or closed). |
2 similar comments
|
@jcadhoc @les-adhoc this forward port of #928 is awaiting action (not merged or closed). |
|
@jcadhoc @les-adhoc this forward port of #928 is awaiting action (not merged or closed). |

Summary
stock.move._prepare_procurement_values()instock_uxto propagate the warehouse that owns the physical source locationWhy
In some multi-warehouse MTO flows the move still carries the commercial warehouse in
warehouse_ideven though its real source location belongs to another warehouse. That stale value is propagated to the next procurement and can attach buy procurements to a draft RFQ from the wrong warehouse.Forward-Port-Of: #928