migrate odoo 14 to 17

Common point.

1.Before import record that not exist comment all custom create and constrains functions.

2.Before import record that already exist comment all custom write and constrains functions.

3.Sometimes also should comment custom compute functions (in compute can create new records).

4.Sometimes also should comment core compute, create, write. 
Example 1. in account.move.line import we comment create, write in account.move.line and write in account.move.
Example 2. in account.journal we have compute that create account.payment.method.line.

5.For auto select external_id click  I want to update data (import-compatible export) (but not required - analogy we can just select external_id field)
6.Unblock import filter on readonly fields. 



Unblock import magic fields like create_date field also should comment this rule


 Unblock write magic field change



Unblock create magic fields


7. Always set active=true and active=false for export all records. In account.move also export canceled records.

1.Companies usuall export and import)

check account_fiscal_country_id set on all companies, if not set just set from odoo interface

2.Account tax, tax group,  account.account 

1. account taxes. (account tax group create by name)
2.account.account (disable default journal defend in odoo core)
3.account.journal. when import journal comment  _compute_inbound_payment_method_line_ids because it create payments method

3.Res users. 

1.company by company
2. password fetch directly from db
3. compare in an excel table a table from the database sorted by key, for example, login and export external_id, and import the combined table. Pre-disable password hashing, and the password token is hashed twice.

4. import company_ids

3.Res partner. 

a)First part,  only info fields.

Fields email,city, ИНН (custom), КПП(custom), ОГРН(custom), ОКПО(custom), name, наименование(custom) , передан другим менеджером(custom), phone, street,street2, is a company, is a customer, is a vendor, mobile, address_type,salesperson

attention!when you import contacts odoo 14 auto set salesperson admin and when create sale order and select custome salesperson will set admin. Dont forger reset this field and import from old database again
also unarchive users

b) migrate partner_id to company and users

с) delete partner that created when import user and company

d)Second part, relation childs_ids and parent_id (related company)

Contacts/ID

4.Bank (res.bank)

5.Bank partner

(res.partner.bank)

6.Employees. department. job.resources

7.Lead (crm.lead)

8.Sale.order

rename name of sale order because it compute auto
for import create_date field comment code
and for unlock write to this field




8.Uom.category uom.uom

9.Product.product (dont forget archived records)

1.Import product.product without company_id

2.Import product template with links to product.product and without company_id.

Dont forget comment create function! 

3.Delete auto create product.template

4.Also if you use multi companies export tax customers and vendors in prooduct.product, because from it will set default tax in sale order lines 

10.Sale.order.line

1.Export import fields

2.Dont forget set unit of measure from product, i use this script

10.1.Details.line (custom)


11.Account.move

potential problems: 

1.Import not without status then posted.

when posted can raise constrain on "posted" move just comment that

12.Account.move.line

1.Not import uom, because uom compute from product_id

13.Account.payment

potential problems: 
1.unique constrain index (name,journal_id) in old database name can be not uniqe need delete index in db.


14.Account.full.reconcicle

1.Export and import, for payments widget display paid info

15.Account.partial.reconcicle

1.Export and import, for payments widge










Sign in to leave a comment
ERROR: could not serialize access due to concurrent
postgresql