Invoice¶
-
class
openerp.addons.magentoerpconnect.invoice.AccountInvoice(pool, cr)[source]¶ Bases:
openerp.models.ModelAdds the
one2manyrelation to the Magento bindings (magento_bind_ids)-
magento_bind_ids¶ One2many field; the value of such a field is the recordset of all the records in
comodel_namesuch that the fieldinverse_nameis equal to the current record.Parameters: - comodel_name – name of the target model (string)
- inverse_name – name of the inverse
Many2onefield incomodel_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_nameandinverse_nameare mandatory except in the case of related fields or field extensions.
-
-
class
openerp.addons.magentoerpconnect.invoice.AccountInvoiceAdapter(connector_env)[source]¶ Bases:
openerp.addons.magentoerpconnect.unit.backend_adapter.GenericAdapterBackend Adapter for the Magento Invoice
-
class
openerp.addons.magentoerpconnect.invoice.MagentoAccountInvoice(pool, cr)[source]¶ Bases:
openerp.models.ModelBinding Model for the Magento Invoice
-
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
Trueto make fields of the target model accessible from the current model (corresponds to_inherits)
The attribute
comodel_nameis 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
Trueto make fields of the target model accessible from the current model (corresponds to_inherits)
The attribute
comodel_nameis mandatory except in the case of related fields or field extensions.
-
-
class
openerp.addons.magentoerpconnect.invoice.MagentoInvoiceExporter(connector_env)[source]¶ Bases:
openerp.addons.connector.unit.synchronizer.ExporterExport invoices to Magento
-
openerp.addons.magentoerpconnect.invoice.MagentoInvoiceSynchronizer¶ alias of
openerp.addons.magentoerpconnect.invoice.MagentoInvoiceExporter
-
openerp.addons.magentoerpconnect.invoice.delay_export_account_invoice(session, model_name, record_id, vals)[source]¶ Delay the job to export the magento invoice.
-
openerp.addons.magentoerpconnect.invoice.export_invoice(session, model_name, record_id)[source]¶ Export a validated or paid invoice.
-
openerp.addons.magentoerpconnect.invoice.export_invoice_paid(session, model_name, record_id)[source]¶ Deprecated in 2.1.0.dev0.
-
openerp.addons.magentoerpconnect.invoice.invoice_create_bindings(session, model_name, record_id)[source]¶ Create a
magento.account.invoicerecord. This record will then be exported to Magento.
-
openerp.addons.magentoerpconnect.invoice.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 aproduct.productform 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