-
- Downloads
[FIX] mrp: carry over origin from source move in 3-step mfr
Behavior prior to this commit: - when the warehouse uses a 3-step manufacturing process, if I create a Sales Order, the MO generated does not show the SO# as "Source", instead it shows the MO# Behavior after this commit: - the MO source shows the SO# (similar to how it works when using the 2-step or the 1-step manufacturing process) - the origins are assigned thus: - Delivery Picking = SO name - Post-prod Picking = SO name - MO = SO name - Pre-prod Picking = MO name Implementation note: - the `origin` gets overwritten when the group is generated in `_run_pull`, because the group name is used as default origin in the base `StockMove` model (see https://github.com/odoo/odoo/blob/a8224115d8254b4200416f552fc86f6e9e68223c/addons/stock/models/stock_move.py#L1030 ). But we need that group to correctly tie the moves to the MO. So instead we go back to look at the dest move on the MO to get its origin. opw-2380717 closes odoo/odoo#62201 Signed-off-by:Nicolas Galler <ngaller@users.noreply.github.com>
Please register or sign in to comment