Migration from 4.2 to 4.4


(Sergi Almacellas Abellana) #1

Must
[SQL] Remove deprecated modules (must be run before update):

DELETE FROM ir_module WHERE name IN ( 'webdav', 'calendar', 'calendar_todo', 'calendar_scheduling', 'calendar_classification', 'party_vcarddav');
DELETE FROM ir_ui_view WHERE module IN ( 'webdav', 'calendar', 'calendar_todo', 'calendar_scheduling', 'calendar_classification', 'party_vcarddav');

[SQL] Update address formats:

UPDATE party_address_format SET format_ = REPLACE(format_, '${district}', '${subdivision}');

Should

[SQL] Relation between purchase and invoice_lines must be deleted:

DROP TABLE purchase_invoice_line_rel;

[MANUAL] The depreciation duration of the products must be checked for all assets as previous value could not be migrated (see issue6395).

[PY] Replace Property fields but MultiValue fields. (see issue2349.

[SQL] After property migration old model data should be cleared:

DELETE FROM ir_model_data WHERE model = 'ir.property';


(Jan Grasnick) #2

If you encounter problems while migrating, there are possibly references to deleted records in ir_property. Enable debug option by passing --dev to trytond-admin. You will see error messages about failed creation of foreign key constraints. You need to cleanup ir_property first before finishing migration.


(Sergi Almacellas Abellana) #3

Here are some cleanup queries.

For parties:

delete from ir_property where res like 'party.party,%' and SUBSTRING(res, POSITION(',' IN res) + 1)::integer not in (select id from party_party);

For product categories:

delete from ir_property where res like 'product.category,%' and SUBSTRING(res, POSITION(',' IN res) + 1)::integer not in (select id from product_category);

For product templates:

delete from ir_property where res like 'product.template,%' and SUBSTRING(res, POSITION(',' IN res) + 1)::integer not in (select id from product_template);