Package: odoo14-addon-base-import-odoo
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 casesmerging databasesone way syncaggregating management data from distributed systemsTable of contentsConfigurationGo 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 modelres.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 (likeres.users#login), create a field mapping if typeunique, then the import will generate a unique value for this field.For models using references with two fields (likeir.attachment), create a field mapping of typeby referenceand 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. Forres.partner, you’ll most certainly fill in{'name':'/'}or somethign similar.UsageTo use this module, you need to:go to an import configuration and hit the buttonRun importbe patient, this creates a cronjob which will start up to a minutes afterwardsreload the form, as soon as the cronjob runs you’ll see a fieldProgressthat lets you inspect what was imported alreadynote 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 againrunning an import a second time won’t duplicate data, it should recognize records imported earlier and just update themKnown issues / RoadmapYes of course this duplicates a lot of connector functionality. Rewrite this with the connector framework, probably collaborate withhttps://github.com/OCA/connector-odoo2odooSupport reference fields, while being at it refactor _run_import_map_values to call a function per field typeAdd duplicate handling strategy ‘Overwrite older’Bug TrackerBugs are tracked onGitHub 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 welcomedfeedback.Do not contact contributors directly about support or help with technical issues.CreditsAuthorsTherp BVHunki Enterprises BVContributorsHolger Brunn <mail@hunki-enterprises.com>MaintainersThis module is maintained by the OCA.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 theOCA/server-toolsproject on GitHub.You are welcome to contribute. To learn how please visithttps://odoo-community.org/page/Contribute.