Skip to content
Snippets Groups Projects
Commit 9c5f2c8b authored by nie's avatar nie
Browse files

[FIX] uom: prevent deleting referenced UoM

Steps:
- Install Inventory
- Make sure Units of Measure are activated in the settings
- Go to Inventory > Configuration > Units of Measure > UoM
- Delete m³
- Go to Products > Products
- Click any product

Bug:
Traceback here:
https://github.com/odoo/odoo/blob/5324f7a6aa757ff6a728258ea1877ded4a6f86cd/addons/product/models/product_template.py#L315
ValueError: External ID not found in the system:
uom.product_uom_cubic_meter

Explanation:
Products refer to UoM since this commit: https://github.com/odoo/odoo/commit/2c079fcd107caec3a25e2a78d4d0e5af1d8237da


Deleting a referenced UoM will most probably break things in the future.
This commit prevents users from deleting UoM that are referenced by an
external ID.

opw:2457057

closes odoo/odoo#66656

Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
parent e0ae3c62
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