The story
01
The problem
Product codes had decayed until almost every new item had none, and the category tree mixed brands, uses and stores.
02
What I found
- Deleting a category in Odoo silently deletes or blanks linked rows in other tables.
- Discount rules break without warning.
03
What I did
- Designed a 122-category tree and a code scheme where the category number is part of the product code.
- Rehearsed the whole change end to end on production copies, and wrote and tested a rollback.
- Added four guards so it stays clean: codes assigned automatically, duplicates blocked by the database, no products in heading categories, and a review queue for uncategorised items — plus a weekly watchdog.
Result
5,611 variants re-coded in 3 minutes 31 seconds while six tills traded. Before/after checks: 0 of 3,267 accounting setups changed, 0 prices changed on any pricelist.