[7.0] Product Import Fails

Bug #1252079 reported by Naran
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Prestashop OpenERP Connector
New
Undecided
Unassigned

Bug Description

Traceback (most recent call last):
  File "/opt/openerpv7/addons/connector/queue/worker.py", line 122, in run_job
    job.perform(session)
  File "/opt/openerpv7/addons/connector/queue/job.py", line 460, in perform
    self.result = self.func(session, *self.args, **self.kwargs)
  File "/opt/openerpv7/addons/prestashoperpconnect/unit/import_synchronizer.py", line 671, in import_record
    importer.run(prestashop_id)
  File "/opt/openerpv7/addons/prestashoperpconnect/unit/import_synchronizer.py", line 553, in run
    super(ProductRecordImport, self).run(prestashop_id)
  File "/opt/openerpv7/addons/prestashoperpconnect/unit/import_synchronizer.py", line 473, in run
    self._default_language
  File "/opt/openerpv7/addons/prestashoperpconnect/unit/import_synchronizer.py", line 489, in _run_record
    self.mapper.convert(prestashop_record)
  File "/opt/openerpv7/addons/connector/unit/mapper.py", line 216, in convert
    self._convert(record, fields=fields)
  File "/opt/openerpv7/addons/connector/unit/mapper.py", line 172, in _convert
    values = meth(record)
  File "/opt/openerpv7/addons/prestashoperpconnect/product.py", line 296, in type
    if record['type']['value'] and record['type']['value'] == 'virtual':
KeyError: 'type'

Revision history for this message
MALATESTA Yves (malatestay) wrote :

I have same error.

Revision history for this message
Juanjo A (juanjoa) wrote :

Some update about this bug?

Revision history for this message
Wolfgang Pichler (wpichler) wrote :

i did had the same error, simple solution to get around is to add the field type to product_product.

so in models/product.py - at class product_product

    _columns = {
        'prestashop_bind_ids': fields.one2many(
            'prestashop.product.product',
            'openerp_id',
            string='PrestaShop Bindings'
        ),
        'type': fields.char('Product type', size=128),
    }

this will fix the bug

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.