Magento Models¶
-
class
openerp.addons.magentoerpconnect.magento_model.MagentoBackend(pool, cr)[source]¶ Bases:
openerp.models.Model-
account_analytic_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.
-
admin_location¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
auth_basic_password¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
auth_basic_username¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
check_magento_structure(*args, **kwargs)[source]¶ Used in each data import.
Verify if a website exists for each backend before starting the import.
-
company_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.
-
default_category_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.
-
default_lang_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.
-
fiscal_position_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.
-
import_categories_from_date¶
-
import_products_from_date¶
-
location¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
output_recorder(*args, **kwargs)[source]¶ Utility method to output a file containing all the recorded requests / responses with Magento. Used to generate test data. Should be called with
erppeekfor instance.
-
password¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
product_binding_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.
-
product_stock_field_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.
-
sale_prefix¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
select_versions(*args, **kwargs)[source]¶ Available versions in the backend.
Can be inherited to add custom versions. Using this method to add a version from an
_inheritdoes not constrain to redefine theversionfield in the_inheritmodel.
-
use_auth_basic¶
-
use_custom_api_path¶
-
username¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
version¶ 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
selectionis mandatory except in the case of related fields or field extensions.- selection – specifies the possible values for this field.
It is given as either a list of pairs (
-
warehouse_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.
-
website_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.magento_model.MagentoConfigSpecializer(pool, cr)[source]¶ Bases:
openerp.models.AbstractModel-
account_analytic_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.
-
fiscal_position_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.
-
specific_account_analytic_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.
-
specific_fiscal_position_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.magento_model.MagentoStore(pool, cr)[source]¶ Bases:
openerp.models.Model-
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
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.
-
create_invoice_on¶ 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
selectionis mandatory except in the case of related fields or field extensions.- selection – specifies the possible values for this field.
It is given as either a list of pairs (
-
name¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
send_invoice_paid_mail¶
-
send_picking_done_mail¶
-
storeview_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.
-
website_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.magento_model.MagentoStoreview(pool, cr)[source]¶ Bases:
openerp.models.Model-
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
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.
-
catalog_price_tax_included¶
-
code¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
enabled¶
-
import_orders_from_date¶
-
lang_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.
-
name¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
no_sales_order_sync¶
-
section_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.
-
sort_order¶
-
store_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.magento_model.MagentoWebsite(pool, cr)[source]¶ Bases:
openerp.models.Model-
code¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
import_partners_from_date¶
-
name¶ Basic string field, can be length-limited, usually displayed as a single-line string in clients
Parameters:
-
product_binding_ids¶ Many2many field; the value of such a field is the recordset.
Parameters: comodel_name – name of the target model (string) The attribute
comodel_nameis mandatory except in the case of related fields or field extensions.Parameters: - relation – optional name of the table that stores the relation in the database (string)
- column1 – optional name of the column referring to “these” records
in the table
relation(string) - column2 – optional name of the column referring to “those” records
in the table
relation(string)
The attributes
relation,column1andcolumn2are optional. If not given, names are automatically generated from model names, providedmodel_nameandcomodel_nameare different!Parameters: - 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)
- limit – optional limit to use upon read (integer)
-
sort_order¶
-
store_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.
-
-
openerp.addons.magentoerpconnect.magento_model.MetadataBatchImport¶ alias of
openerp.addons.magentoerpconnect.magento_model.MetadataBatchImporter
-
class
openerp.addons.magentoerpconnect.magento_model.MetadataBatchImporter(connector_env)[source]¶ Bases:
openerp.addons.magentoerpconnect.unit.import_synchronizer.DirectBatchImporterImport the records directly, without delaying the jobs.
Import the Magento Websites, Stores, Storeviews
They are imported directly because this is a rare and fast operation, and we don’t really bother if it blocks the UI during this time. (that’s also a mean to rapidly check the connectivity with Magento).
-
class
openerp.addons.magentoerpconnect.magento_model.StoreAdapter(connector_env)[source]¶ Bases:
openerp.addons.magentoerpconnect.unit.backend_adapter.GenericAdapter
-
class
openerp.addons.magentoerpconnect.magento_model.StoreAddCheckpoint(connector_env)[source]¶ Bases:
openerp.addons.connector.connector.ConnectorUnitAdd a connector.checkpoint on the magento.storeview or magento.store record
-
openerp.addons.magentoerpconnect.magento_model.StoreImport¶ alias of
openerp.addons.magentoerpconnect.magento_model.StoreImporter
-
class
openerp.addons.magentoerpconnect.magento_model.StoreImportMapper(connector_env)[source]¶ Bases:
openerp.addons.connector.unit.mapper.ImportMapper-
direct= [('name', 'name')]¶
-
-
class
openerp.addons.magentoerpconnect.magento_model.StoreImporter(connector_env)[source]¶ Bases:
openerp.addons.magentoerpconnect.unit.import_synchronizer.MagentoImporterImport one Magento Store (create a sale.shop via _inherits)
-
openerp.addons.magentoerpconnect.magento_model.StoreViewAddCheckpoint¶ alias of
openerp.addons.magentoerpconnect.magento_model.StoreAddCheckpoint
-
class
openerp.addons.magentoerpconnect.magento_model.StoreviewAdapter(connector_env)[source]¶ Bases:
openerp.addons.magentoerpconnect.unit.backend_adapter.GenericAdapter
-
openerp.addons.magentoerpconnect.magento_model.StoreviewImport¶ alias of
openerp.addons.magentoerpconnect.magento_model.StoreviewImporter
-
class
openerp.addons.magentoerpconnect.magento_model.StoreviewImportMapper(connector_env)[source]¶ Bases:
openerp.addons.connector.unit.mapper.ImportMapper-
direct= [('name', 'name'), ('code', 'code'), ('is_active', 'enabled'), ('sort_order', 'sort_order')]¶
-
-
class
openerp.addons.magentoerpconnect.magento_model.StoreviewImporter(connector_env)[source]¶ Bases:
openerp.addons.magentoerpconnect.unit.import_synchronizer.MagentoImporterImport one Magento Storeview
-
class
openerp.addons.magentoerpconnect.magento_model.WebsiteAdapter(connector_env)[source]¶ Bases:
openerp.addons.magentoerpconnect.unit.backend_adapter.GenericAdapter