Possible error in sales import because Magento gives wrong information : storeview_id instead of store_id

Bug #1235269 reported by Romain Deheele - Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Connector - Magento
Fix Released
High
Romain Deheele - Camptocamp

Bug Description

Hello,

magentoerpconnect rev 908

When you import a sale order where the storeview doesn't have the same id than his parent store.
Traceback
  File "/home/rdeheele/customers/openerp_buildout/parts/connector/connector/queue/worker.py", line 121, in run_job
    job.perform(session)
  File "/home/rdeheele/customers/openerp_buildout/parts/connector/connector/queue/job.py", line 460, in perform
    self.result = self.func(session, *self.args, **self.kwargs)
  File "/home/rdeheele/customers/openerp_buildout/parts/magentoerpconnect/magentoerpconnect/unit/import_synchronizer.py", line 311, in import_record
    importer.run(magento_id, force=force)
  File "/home/rdeheele/customers/openerp_buildout/parts/magentoerpconnect/magentoerpconnect/unit/import_synchronizer.py", line 145, in run
    self.magento_record = self._get_magento_data()
  File "/home/rdeheele/customers/openerp_buildout/parts/magentoerpconnect/magentoerpconnect/sale.py", line 417, in _get_magento_data
    oe_website_id = store.website_id.id
AttributeError: 'NoneType' object has no attribute 'id'

In sale import,
if we don't have the website_id, we don't have the store_id anymore, the id in record['store_id'] is the storeview_id !

This problem is a Magento bug :
http://www.magentocommerce.com/bug-tracking/issue?issue=15886
but as Magento doesn't resolve this bug, it's also a problem for us.

Romain

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

This is in fact a bug in the connector:

As shown in the documentation: http://www.magentocommerce.com/api/soap/miscellaneous/store.info.html

Despite a totally misleading name, store_id is not reference to the store but to the storeview.

So we have to change the mapping to bind it with the storeview instead of the store.

Changed in openerp-connector:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Romain Deheele - Camptocamp (romaindeheele)
Changed in openerp-connector:
status: Confirmed → Fix Released
information type: Embargoed → Public
affects: openerp-connector → openerp-connector-magento
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.