Connector

class openerp.addons.magentoerpconnect.connector.MagentoBinding(pool, cr)[source]

Bases: openerp.models.AbstractModel

Abstract Model for the Bindigs.

All the models used as bindings between Magento and OpenERP (magento.res.partner, magento.product.product, ...) should _inherit it.

backend_id

The value of such a field is a recordset of size 0 (no record) or 1 (a single record).

Parameters:
  • comodel_name – name of the target model (string)
  • domain – an optional domain to set on candidate values on the client side (domain or string)
  • context – an optional context to use on the client side when handling that field (dictionary)
  • ondelete – what to do when the referred record is deleted; possible values are: 'set null', 'restrict', 'cascade'
  • auto_join – whether JOINs are generated upon search through that field (boolean, by default False)
  • delegate – set it to True to make fields of the target model accessible from the current model (corresponds to _inherits)

The attribute comodel_name is mandatory except in the case of related fields or field extensions.

magento_id

Basic string field, can be length-limited, usually displayed as a single-line string in clients

Parameters:
  • size (int) – the maximum size of values stored for that field
  • translate (bool) – whether the values of this field can be translated
openerp.addons.magentoerpconnect.connector.add_checkpoint(session, model_name, record_id, backend_id)[source]

Add a row in the model connector.checkpoint for a record, meaning it has to be reviewed by a user.

Parameters:
  • session (openerp.addons.connector.session.ConnectorSession) – current session
  • model_name (str) – name of the model of the record to be reviewed
  • record_id (int) – ID of the record to be reviewed
  • backend_id (int) – ID of the Magento Backend
openerp.addons.magentoerpconnect.connector.get_environment(session, model_name, backend_id)[source]

Create an environment to work with.