Steps to reproduce the bug:
- Enable “Product packing” in the inventory settings
- Create a storable product “P1”
- Add a package with barcode “123”
- save the changes
- Delete the package
- Try to set the same barcode “123” for the product
Problem:
A validation error is triggered: "A packaging already uses the barcode"
Solution:
When we delete the package from the product, we have to delete
completely the “product.packaging" record.
opw-3378288
closesodoo/odoo#131825
X-original-commit: d01d8a9cedec2d1c17469538103340fc934470f1
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>