Stock Picking

openerp.addons.magentoerpconnect.stock_picking.MagentoPickingExport

alias of openerp.addons.magentoerpconnect.stock_picking.MagentoPickingExporter

class openerp.addons.magentoerpconnect.stock_picking.MagentoPickingExporter(connector_env)[source]

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

run(binding_id)[source]

Export the picking to Magento

class openerp.addons.magentoerpconnect.stock_picking.MagentoStockPicking(pool, cr)[source]

Bases: openerp.models.Model

magento_order_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.

openerp_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.

picking_method
Parameters:
  • selection – specifies the possible values for this field. It is given as either a list of pairs (value, string), or a model method, or a method name.
  • selection_add – provides an extension of the selection in the case of an overridden field. It is a list of pairs (value, string).

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

class openerp.addons.magentoerpconnect.stock_picking.StockPicking(pool, cr)[source]

Bases: openerp.models.Model

magento_bind_ids

One2many field; the value of such a field is the recordset of all the records in comodel_name such that the field inverse_name is equal to the current record.

Parameters:
  • comodel_name – name of the target model (string)
  • inverse_name – name of the inverse Many2one field in comodel_name (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)
  • auto_join – whether JOINs are generated upon search through that field (boolean, by default False)
  • limit – optional limit to use upon read (integer)

The attributes comodel_name and inverse_name are mandatory except in the case of related fields or field extensions.

class openerp.addons.magentoerpconnect.stock_picking.StockPickingAdapter(connector_env)[source]

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

add_tracking_number(magento_id, carrier_code, tracking_title, tracking_number)[source]

Add new tracking number.

Parameters:
  • magento_id – shipment increment id
  • carrier_code – code of the carrier on Magento
  • tracking_title – title displayed on Magento for the tracking
  • tracking_number – tracking number
create(order_id, items, comment, email, include_comment)[source]

Create a record on the external system

get_carriers(magento_id)[source]

Get the list of carrier codes allowed for the shipping.

Parameters:magento_id – order increment id
Return type:list
openerp.addons.magentoerpconnect.stock_picking.delay_export_picking_out(session, model_name, record_id, vals)[source]
openerp.addons.magentoerpconnect.stock_picking.export_picking_done(session, model_name, record_id, with_tracking=True)[source]

Export a complete or partial delivery order.

openerp.addons.magentoerpconnect.stock_picking.picking_out_done(session, model_name, record_id, picking_method)[source]

Create a magento.stock.picking record. This record will then be exported to Magento.

Parameters:picking_method (str) – picking_method, can be ‘complete’ or ‘partial’
openerp.addons.magentoerpconnect.stock_picking.unwrap_binding(session, job, id_pos=2)

Open a form view with the unwrapped record.

For instance, for a job on a magento.product.product, it will open a product.product form view with the unwrapped record.

Parameters:
  • id_pos – position of the binding ID in the args
  • binder_class – base class to search for the binder