Skip to content
Snippets Groups Projects
Commit 4f07b260 authored by Simon Wydooghe's avatar Simon Wydooghe
Browse files

[FIX] mrp: properly handle subassembly production with same serial


If a subassembly was used as component in a finished good and both the
subassembly and finished good were unbuilt, the subassembly could not be
produced again with the same serial (specific use case: medical hardware
refurbishment, medical device is produced/packaged (subassembly), put as
a component into a procedure pack (finished good), both are returned and
unbuilt so the medical device can be refurbished and produced/packaged
again into a subassembly with the same serial).

The _is_finished_sn_already_produced function duplicates domain was
wrongly picking up stock move lines related to the unbuild of the
finished good, making the function wrongly returning True. This fixes
the search domain and adds a test to prevent regression.

closes odoo/odoo#132723

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent 5e7cb75a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment