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

[FIX] mrp: handle unbuild/scrap/unscrap and production with same serial


When a product has been unbuilt and also (mistakenly) scrapped, it's
impossible to reuse the serial number in production again, even if the
product is unscrapped.

This fixes the sanity check in a similar way to the _check_sn_uniqueness
function, not just checking for removed stock move lines, but also unremoved
stock move lines. A test case is also added to check this scenario.

This is a similar fix to a previous commit we did
(4f07b260) where we bumped into a
problem with the duplicate serial sanity check.

closes odoo/odoo#139643

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent f5172484
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment