diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-06-23 11:58:53 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2016-06-23 12:19:14 +0200 |
| commit | b114c9e6810a638a6f466d1e699c87c3262c1a7a (patch) | |
| tree | 09816a69b0d9cf4d7bfb44124e39875cc64c0c1f /addons/web/static/src/js/framework/session_instance.js | |
| parent | f0c571f7738015920375cdf4182e0a4b6f467095 (diff) | |
[FIX] purchase_requisition: link stock.move to procurement
When a purchase requisition is created from a procurement, the
subsequent stock moves (create from the PO lines) are not linked to the
original procurement/stock moves.
This is an issue in the following use case:
- Product "Assembly" configured in MTO and manufactured
- Product "Part" configured in MTO and bought from suppliers thanks to
purchase requisitions
- A BoM is created for "Assembly" and is build from "Part"
When "Assembly" is sold, a MO is created, which generated a purchase
requisition for "Part". The MO is in state "Awaiting for Raw Materials"
since we need to purchase the components.
However, when the components are purchased and received, the MO stays in
the same state since there is not link between the stock move received
from the PO and the stock move created for the MO. The MO is therefore
stuck in "Awaiting for Raw Materials" state.
The fix is to keep track of the original procurement and stock moves.
Ideally, we should link the procurement to the PO lines, but that is not
possible since the field `purchase_line_id` on the procurement is a
Many2one. Therefore, we need to hook the confirmation process and
manually link the stock moves related to the PO to the stock moves
related to the MO.
opw-681138
Diffstat (limited to 'addons/web/static/src/js/framework/session_instance.js')
0 files changed, 0 insertions, 0 deletions
