What's the deal with SQL queries? The query in _check_category_reference_uniqueness returns: category_id | uom_count -------------+----------- (0 rows) but if we removed AND U.active = 't', we would have had: category_id | uom_count -------------+----------- 8 | 0 (1 row) As a result, the check on uom_data['uom_count'] == 0 could simply never be true. opw 1959679 closes odoo/odoo#32788 Signed-off-by: Nans Lefebvre (len) <len@odoo.com>