Invoice¶
-
class
openerp.addons.magentoerpconnect.invoice.
AccountInvoice
(pool, cr)[source]¶ Bases:
openerp.models.Model
Adds the
one2many
relation 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_name
such that the fieldinverse_name
is equal to the current record.Parameters: - comodel_name – name of the target model (string)
- inverse_name – name of the inverse
Many2one
field 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_name
andinverse_name
are 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.GenericAdapter
Backend Adapter for the Magento Invoice
-
class
openerp.addons.magentoerpconnect.invoice.
MagentoAccountInvoice
(pool, cr)[source]¶ Bases:
openerp.models.Model
Binding 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
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.
-
-
class
openerp.addons.magentoerpconnect.invoice.
MagentoInvoiceExporter
(connector_env)[source]¶ Bases:
openerp.addons.connector.unit.synchronizer.Exporter
Export 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.invoice
record. 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.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