Error when migration from 7.2 to 7.4 with missing lots by warehouse relate

Hi,

I’m migrating 7.2 to 7.4.

I’m getting this error when doing trytond-admin:

178281 140004048367680 [2025-05-06 08:50:42,631] WARNING trytond.convert could not delete 381@ir.action.act_window from stock_lot.act_lots_by_warehouse_relate (You are trying to read records "381" of "Action act window" that don't exist. - ).
178281 140004048367680 [2025-05-06 08:50:42,637] ERROR trytond.convert could not deactivate 381@ir.action.act_window from stock_lot.act_lots_by_warehouse_relate (You are trying to write to records "381" of "Action act window" that don't exist. - )

Indeed, this relate was removed here : Improve stock relates (!1768) · Merge requests · Tryton / Tryton · GitLab

Linked to this ? Use warning instead of error to log failure to delete XML record (#13007) · Issues · Tryton / Tryton · GitLab

What should be done to have a clean database and removing the error ?

Thanks :slight_smile:

Solved by deleting in ir_model_data and ir_action:


DELETE FROM ir_model_data WHERE fs_id='act_lots_by_warehouse_relate';

DELETE FROM ir_action WHERE name='Lots By Warehouse';

I guess convert.py could be a little bit smarter and if the record is already deleted (by an ON DELETE CASCADE for example) it would not complain.

1 Like

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