Open Magento Fields, non-supported in multi site environment

Bug #972756 reported by Kyle Waid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Confirmed
Undecided
gekko tek

Bug Description

In a multi magento environment you have One OpenERP and 2 magento websites. External_referential 1, external_referential 2
in magerp_product_attributes, we have all attributes from both referentials, with a nice column to separate the shops.

When opening magento fields, it randomly can malfunction and break. For instance. I assign a new product to an attribute set from external referential 1. When I click open magento fields, it will see attributes that are from a different referential (2). It will attempt to call magento and ask for information about it, but it will call referential 1, and of course this attribute does not exist.
This results in an unusuable magento fields, and essentially makes it impossible to manage products.

  File "/usr/local/openerp/midwest/openerp-server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/local/openerp/midwest/openerp-server/bin/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/openerp/midwest/openerp-server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/openerp/midwest/openerp-server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/openerp/midwest/openerp-server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/openerp/midwest/addons/magentoerpconnect/product.py", line 913, in fields_view_get
    cr, uid, field_names, context)
  File "/usr/local/openerp/midwest/addons/magentoerpconnect/product.py", line 779, in redefine_prod_view
    cr, uid, mag_group_id, attr_set.referential_id.id)
  File "/usr/local/openerp/midwest/addons/base_external_referentials/external_osv.py", line 193, in extid_to_oeid
    result = self.get_external_data(cr, uid, conn , external_referential_id, {}, {'id':id})
  File "/usr/local/openerp/midwest/addons/magentoerpconnect/magerp_osv.py", line 287, in get_external_data
    return self.mage_import_base(cr, uid, conn, external_referential_id, defaults, context)#TODO refactor mage_import_base calls to this interface
  File "/usr/local/openerp/midwest/addons/magentoerpconnect/magerp_osv.py", line 254, in mage_import_base
    data[0]['external_id'] = context.get('id', False)
TypeError: list indices must be integers, not str

Revision history for this message
Kyle Waid (midwest) wrote :

This is not related to deleting magento attributes. The error can be caused without this. I am still unsure as to what triggers the error

Revision history for this message
Kyle Waid (midwest) wrote :

[2012-04-03 14:50:11,078][staging] INFO:ext synchro:[01]: Error when importing on fly the object magerp.product_attribute_groups with the external_id 88 and the external referential 1.
[2012-04-03 14:50:11,078][staging] INFO:ext synchro:[02]: Error : list indices must be integers, not str
[2012-04-03 14:50:11,079][staging] ERROR:web-services:Uncaught exception

This happens when clicking on open magento fields. the attribute group is from a different website so it should never be called. Also it says referential 1, but it really belongs to 2

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

Hello,

Which branch are you using?

Do you still see this bug?

Changed in magentoerpconnect:
status: New → Incomplete
Revision history for this message
Kyle Waid (midwest) wrote :

Affects all branches

Changed in magentoerpconnect:
assignee: nobody → gekko tek (gekkotek)
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.