Synchronizers

Import

Importers for Magento.

An import can be skipped if the last sync date is more recent than the last update in Magento.

They should call the bind method if the binder even if the records are already bound, to update the last sync date.

class openerp.addons.magentoerpconnect.unit.import_synchronizer.AddCheckpoint(connector_env)[source]

Bases: openerp.addons.connector.connector.ConnectorUnit

Add a connector.checkpoint on the underlying model (not the magento.* but the _inherits’ed model)

run(openerp_binding_id)[source]
openerp.addons.magentoerpconnect.unit.import_synchronizer.BatchImportSynchronizer

alias of BatchImporter

class openerp.addons.magentoerpconnect.unit.import_synchronizer.BatchImporter(connector_env)[source]

Bases: openerp.addons.connector.unit.synchronizer.Importer

The role of a BatchImporter is to search for a list of items to import, then it can either import them directly or delay the import of each item separately.

run(filters=None)[source]

Run the synchronization

openerp.addons.magentoerpconnect.unit.import_synchronizer.DelayedBatchImport

alias of DelayedBatchImporter

class openerp.addons.magentoerpconnect.unit.import_synchronizer.DelayedBatchImporter(connector_env)[source]

Bases: openerp.addons.magentoerpconnect.unit.import_synchronizer.BatchImporter

Delay import of the records

openerp.addons.magentoerpconnect.unit.import_synchronizer.DirectBatchImport

alias of DirectBatchImporter

class openerp.addons.magentoerpconnect.unit.import_synchronizer.DirectBatchImporter(connector_env)[source]

Bases: openerp.addons.magentoerpconnect.unit.import_synchronizer.BatchImporter

Import the records directly, without delaying the jobs.

openerp.addons.magentoerpconnect.unit.import_synchronizer.MagentoImportSynchronizer

alias of MagentoImporter

class openerp.addons.magentoerpconnect.unit.import_synchronizer.MagentoImporter(connector_env)[source]

Bases: openerp.addons.connector.unit.synchronizer.Importer

Base importer for Magento

run(magento_id, force=False)[source]

Run the synchronization

Parameters:magento_id – identifier of the record on Magento
openerp.addons.magentoerpconnect.unit.import_synchronizer.SimpleRecordImport

alias of SimpleRecordImporter

class openerp.addons.magentoerpconnect.unit.import_synchronizer.SimpleRecordImporter(connector_env)[source]

Bases: openerp.addons.magentoerpconnect.unit.import_synchronizer.MagentoImporter

Import one Magento Website

class openerp.addons.magentoerpconnect.unit.import_synchronizer.TranslationImporter(connector_env)[source]

Bases: openerp.addons.connector.unit.synchronizer.Importer

Import translations for a record.

Usually called from importers, in _after_import. For instance from the products and products’ categories importers.

run(magento_id, binding_id, mapper_class=None)[source]
openerp.addons.magentoerpconnect.unit.import_synchronizer.import_batch(session, model_name, backend_id, filters=None)[source]

Prepare a batch import of records from Magento

openerp.addons.magentoerpconnect.unit.import_synchronizer.import_record(session, model_name, backend_id, magento_id, force=False)[source]

Import a record from Magento

Export

class openerp.addons.magentoerpconnect.unit.export_synchronizer.MagentoBaseExporter(connector_env)[source]

Bases: openerp.addons.connector.unit.synchronizer.Exporter

Base exporter for Magento

run(binding_id, *args, **kwargs)[source]

Run the synchronization

Parameters:binding_id – identifier of the binding record to export
class openerp.addons.magentoerpconnect.unit.export_synchronizer.MagentoExporter(connector_env)[source]

Bases: openerp.addons.magentoerpconnect.unit.export_synchronizer.MagentoBaseExporter

A common flow for the exports to Magento

openerp.addons.magentoerpconnect.unit.export_synchronizer.export_record(session, model_name, binding_id, fields=None)[source]

Export a record on Magento

Delete

openerp.addons.magentoerpconnect.unit.delete_synchronizer.MagentoDeleteSynchronizer

alias of MagentoDeleter

class openerp.addons.magentoerpconnect.unit.delete_synchronizer.MagentoDeleter(connector_env)[source]

Bases: openerp.addons.connector.unit.synchronizer.Deleter

Base deleter for Magento

run(magento_id)[source]

Run the synchronization, delete the record on Magento

Parameters:magento_id – identifier of the record to delete
openerp.addons.magentoerpconnect.unit.delete_synchronizer.export_delete_record(session, model_name, backend_id, magento_id)[source]

Delete a record on Magento