Tryton - Issues

 

Issue7483

Title Migration to 4.8 fails because of duplicated button
Priority bug Status chatting
Superseder Nosy List alex.melkoff, ced
Type Components stock_package_shipping
Assigned To Keywords
Reviews

Created on 2018-05-31.14:13:22 by alex.melkoff, last changed by ced.

Messages
msg41289 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-06.16:39:07
Indeed it is a way to fix it.
This query could be run in the ShipmentOut.__register__ method as a migration from 4.6. Could you provide a patch?
msg41280 (view) Author: [hidden] (alex.melkoff) Date: 2018-06-06.16:17:45
Seems like an acceptable compromise. This SQL query seems to work:

UPDATE ir_model_data SET fs_id='shipment_out_create_shipping_button' WHERE module='stock_package_shipping' AND model='ir.model.button' AND fs_id='create_shipping_button';
msg41155 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-05-31.14:44:43
I think we can not do anything because series 4.6 has been released, it is too late. If we change back the id, we will create the same issue for user who created the database with 4.6 series.
We can only add a SQL query to https://discuss.tryton.org/t/migration-from-4-6-to-4-8/440
msg41154 (view) Author: [hidden] (alex.melkoff) Date: 2018-05-31.14:13:22
There is a button, that is created with stock.xml and id of that button was changed in https://bugs.tryton.org/issue6389, so if this module (stock_package_shipping) was installed in 4.6 there is a button with the same name but different id in database. So migration fails with the following error:

In tag record: model ir.model.button with id shipment_out_create_shipping_button.
...
UserError: The button name in model must be unique! -
History
Date User Action Args
2018-06-06 16:39:07cedsetmessages: + msg41289
2018-06-06 16:17:45alex.melkoffsetmessages: + msg41280
2018-05-31 14:44:44cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg41155
2018-05-31 14:13:22alex.melkoffcreate

Showing 10 items. Show all history (warning: this could be VERY long)