Backend Adapters

class openerp.addons.magentoerpconnect.unit.backend_adapter.GenericAdapter(connector_env)[source]

Bases: openerp.addons.magentoerpconnect.unit.backend_adapter.MagentoCRUDAdapter

admin_url(id)[source]

Return the URL in the Magento admin for a record

create(data)[source]

Create a record on the external system

delete(id)[source]

Delete a record on the external system

read(id, attributes=None)[source]

Returns the information of a record

Return type:dict
search(filters=None)[source]

Search records according to some criterias and returns a list of ids

Return type:list
search_read(filters=None)[source]

Search records according to some criterias and returns their information

write(id, data)[source]

Update records on the external system

class openerp.addons.magentoerpconnect.unit.backend_adapter.MagentoCRUDAdapter(connector_env)[source]

Bases: openerp.addons.connector.unit.backend_adapter.CRUDAdapter

External Records Adapter for Magento

create(data)[source]

Create a record on the external system

delete(id)[source]

Delete a record on the external system

read(id, attributes=None)[source]

Returns the information of a record

search(filters=None)[source]

Search records according to some criterias and returns a list of ids

search_read(filters=None)[source]

Search records according to some criterias and returns their information

write(id, data)[source]

Update records on the external system

class openerp.addons.magentoerpconnect.unit.backend_adapter.MagentoLocation(location, username, password, use_custom_api_path=False)[source]

Bases: object

location
openerp.addons.magentoerpconnect.unit.backend_adapter.call_to_key(method, arguments)[source]

Used to ‘freeze’ the method and arguments of a call to Magento so they can be hashable; they will be stored in a dict.

Used in both the recorder and the tests.

openerp.addons.magentoerpconnect.unit.backend_adapter.output_recorder(filename)[source]
openerp.addons.magentoerpconnect.unit.backend_adapter.record(method, arguments, result)[source]

Utility function which can be used to record test data during synchronisations. Call it from MagentoCRUDAdapter._call

Then output_recorder can be used to write the data recorded to a file.