Migration from 4.2 to 4.4

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';

:arrow_forward: Migration from 4.4 to 4.6

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.

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);

What am I suppost to do here? Trying to migrate from 4.2 to 4.4 but I get a lot of errors.

Thanks in advance.
Bram van der Sar

Just fill the depreciation duration of asset products after the migration with the proper value.