Import from Odoo
(0)
53

Import from Odoo

FREE

Available versions
Required apps
Discuss (mail)
Sparse Fields (base_sparse_field)
Technical name
base_import_odoo
License
AGPL-3
Secure dependencies
N/A
Import from Odoo

Import from Odoo

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

This module was written to import data from another Odoo database. The idea is that you define which models to import from the other database, and add eventual mappings for records you don’t want to import.

Use cases

  • merging databases
  • one way sync
  • aggregating management data from distributed systems

Table of contents

Configuration

Go to Settings / Remote Odoo import / Import configurations and create a configuration.

After filling in your credentials, select models you want to import from the remote database. If you only want to import a subset of the records, add an appropriate domain.

The import will copy records of all models listed, and handle links to records of models which are not imported depending on the existing field mappings. Field mappings to local records also are a stopping condition. Without those, the import will have to create some record for all required x2x fields, which you probably don’t want.

Probably you’ll want to map records of model res.company, and at least the admin user.

The module doesn’t import one2many fields, if you want to have those, add the model the field in question points to to the list of imported models, possibly with a domain.

If you don’t fill in a remote ID, the addon will use the configured local ID for every record of the model (this way, you can for example map all users in the remote system to some import user in the current system).

For fields that have a uniqueness constraint (like res.users#login), create a field mapping if type unique, then the import will generate a unique value for this field.

For models using references with two fields (like ir.attachment), create a field mapping of type by reference and select the two fields involved. The import will transform known ids (=ids of models you import) to the respective local id, and clean out the model/id fields for unknown models/ids.

You can add custom defaults per model in case your database has different required fields than the source database. For res.partner, you’ll most certainly fill in {'name': '/'} or somethign similar.

Usage

To use this module, you need to:

  1. go to an import configuration and hit the button Run import
  2. be patient, this creates a cronjob which will start up to a minutes afterwards
  3. reload the form, as soon as the cronjob runs you’ll see a field Progress that lets you inspect what was imported already
  4. note that the cronjob also resets the password as soon as it has read it. So for a subsequent import, you’ll have to fill it in again
  5. running an import a second time won’t duplicate data, it should recognize records imported earlier and just update them

Known issues / Roadmap

  • Yes of course this duplicates a lot of connector functionality. Rewrite this with the connector framework, probably collaborate with https://github.com/OCA/connector-odoo2odoo
  • Support reference fields, while being at it refactor _run_import_map_values to call a function per field type
  • Add duplicate handling strategy ‘Overwrite older’

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Therp BV
  • Hunki Enterprises BV

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/server-tools project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

0.0 / 5.0
based on 0 ratings

Python dependencies

Package Version Secured
psycopg2_binary 2.8.6
odoorpc 0.10.1
This app has automated tests.

Available languages

Language % translated
Slovenian / slovenščina
75%
German / Deutsch
27%
Italian / Italiano
24%
Portuguese (BR) / Português (BR)
22%
Dutch / Nederlands
21%
Croatian / hrvatski jezik
18%
Finnish / Suomi
18%
Arabic / الْعَرَبيّة
18%
Turkish / Türkçe
17%
Turkish / Türkçe
17%
Chinese (Simplified) / 简体中文
17%
Russian / русский язык
16%
Spanish (MX) / Español (MX)
16%
Portuguese / Português
16%
Hungarian / Magyar
16%
English (UK)
14%
Mongolian / монгол
14%
Estonian / Eesti keel
14%
Thai / ภาษาไทย
14%
Macedonian / македонски јазик
14%
Dutch (BE) / Nederlands (BE)
14%
Portuguese / Português
14%
Romanian / română
14%
Bosnian / bosanski jezik
14%
Serbian (Latin) / srpski
13%
Spanish (VE) / Español (VE)
13%
Vietnamese / Tiếng Việt
13%
Croatian / hrvatski jezik
13%
Indonesian / Bahasa Indonesia
13%
Swedish / Svenska
13%
Chinese (Traditional) / 繁體中文
13%
Japanese / 日本語
13%
Spanish (EC) / Español (EC)
13%
Polish / Język polski
13%
Spanish (AR) / Español (AR)
12%
Spanish / Español
12%
Hebrew / עִבְרִי
12%
Spanish (PE) / Español (PE)
12%
Spanish (CO) / Español (CO)
12%
Latvian / latviešu valoda
12%
Spanish (DO) / Español (DO)
12%
Spanish (CL) / Español (CL)
12%
Spanish (CR) / Español (CR)
12%
Ukrainian / українська
12%
Persian / فارس
12%
Bulgarian / български език
12%
Slovak / Slovenský jazyk
12%
Spanish / Español
12%
Greek / Ελληνικά
10%
French (CA) / Français (CA)
10%
French (CH) / Français (CH)
10%
Catalan / Català
10%
Norwegian Bokmål / Norsk bokmål
10%
Spanish (PY) / Español (PY)
9%
Dutch / Nederlands
9%
Vietnamese / Tiếng Việt
6%
Lithuanian / Lietuvių kalba
6%
Lithuanian / Lietuvių kalba
6%
Danish / Dansk
2%
French / Français
1%
Galician / Galego
1%
Galician / Galego
1%
French / Français
1%