ERROR trytond.convert Could not delete id 10 from model product.uom

I’m attempting to update from version 6.6 to 7.0, but when I use the trytond-admin command, I encounter this error:

When searching for a solution, I can’t find how to fix the database before upgrading to avoid this error because this product is configured like the others.

Can anyone help?

4108 140084820404032 [2024-02-06 09:56:34,061] ERROR trytond.convert Could not delete id 10 from model product.uom.
[...]
modelstorage.py", line 1383, in required_test
    raise RequiredValidationError(
trytond.model.modelstorage.RequiredValidationError: Une valeur est requise pour le champ « UDM d'achat » sur « [Ac - PAC] Achats - Prestations Artisanales (Créations) » de « Modèle produit ». -

It seems you have a product.uom which is created via xml and is now deleted in newer version. The id of this UoM is 10.

There are some products which use such Uom as purchase uom. You should search for such products and update the purchase uom to a different one.

This should fix the error.

You can ignore them. Indeed I think they should be warnings instead of errors.

Thank you both for your quick responses.

I’ve found products using this unit of measure (10 = “Work Day”) and replaced it with '(“Day”), but it seems this unit of measure is also used in billing, making it not as easily deletable from those records.

25117 139743131203392 [2024-02-06 10:57:13,140] ERROR trytond.convert Could not delete id 10 from model product.uom.
trytond.model.modelsql.ForeignKeyError: Les enregistrements ne peuvent pas être supprimés car ils sont utilisés par le champ « Unité » de « Ligne de Facture ». -

Can I safely ignore this?
I’ve to be sure that my database won’t be corrupted.

You should not because it is not the same measure: 1 work day = 8 hours but 1 days = 24 hours.

Yes.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.