Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To facilitate the migration of master data from OpenERP 7 to Odoo 16, a custom module named OpenERP 7 Data Import has been created. This module functions by establishing a connection with the legacy OpenERP 7 database and transferring the data accordingly into the new Odoo 16.

Step 1: Verifying the connectivity of OpenERP 7 Database

As the module works by connecting to OpenERP 7 database, the Odoo container should be able to connect to the database. In order to verify that, run the below command from inside the docker host.

Code Block
psql -h <IP of old server> -U <OpenERP db username>

Step 2: Installing the module

  • Now login to Odoo v16 as admin user and Navigate to Menu → Apps

  • Remove the default filter for Apps and search for OpenERP

  • You will find a module named as OpenERP 7 Data Import

  • Click on Activate to install the module.

    image-20240729-044408.pngImage Added

Step 3: Configuring Database connection details

The database connection information needs to be configured as environment variables for Odoo 16 service. Add the following environment variables under environment section of Odoo service in docker-compose.yml

Code Block
OPENERP_DB_HOST: <Ip of database server of OpenERP7 database>
OPENERP_DB_PORT: 5432
OPENERP_DB_NAME: openerp
OPENERP_DB_USER: <db_username>
OPENERP_DB_PASSWORD: <db_password>

Once you have added the configuration, update the Odoo 16 service by running docker compose up -d odoo

Step 4: Enable Developer Mode to execute the migration jobs

Odoo 16 debug mode needs to be enabled to run the jobs for migration. In order to enable debug mode, login as admin and then add ?debug=1 to the URL. Example URL would look like http://localhost:8069/web?debug=1

Step 5: Running the migration jobs

Now with the developer mode enabled, navigate to Menu -> Settings -> Technical. On the menu select Scheduled Actions

...

On the Scheduled Actions page add a group by for Model. Now you will see a model named as OpenERP 7 Data Import, under which you find 7 different jobs configured.

...

Now run each of the jobs manually by clicking each job name and pressing the Run Manually button. The jobs should be run in the following order.

  1. UoM Category Migration

  2. UoM Migration

  3. Product Category Migration

  4. Product Migration

  5. Product Update Inactive Products

  6. Supplier Migration

  7. Customer Migration

Note: For supplier and customer migration a user input is needed to specify the range of ids to be migrated. This has been done to avoid out of memory errors in large implementations. The starting ID and ending ID should be given in thePython Codetab of the job window. We recommend going with 20000 increments for each cycle.

...

Panel
panelIconId23ed
panelIcon:track_next:
panelIconText⏭️
bgColor#E3FCEF

Next Step: Once you have completed the masterdata import process, now go back to the parent page here and continue with other metadata import from here.