waltervargas / prestashoperpconnect

A module that permits OpenERP to connect to Prestashop.
2 stars 3 forks source link

duplicate key value error on import products #8

Open waltervargas opened 10 years ago

waltervargas commented 10 years ago
  File "/home/vagrant/addons/connector/queue/worker.py", line 122, in run_job
    job.perform(session)
  File "/home/vagrant/addons/connector/queue/job.py", line 490, in perform
    self.result = self.func(session, *self.args, **self.kwargs)
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 1030, in import_record
    importer.run(prestashop_id)
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 680, in run
    self._after_import(erp_id)
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 768, in _after_import
    self.import_combinations()
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 799, in import_combinations
    combination['id']
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 1030, in import_record
    importer.run(prestashop_id)
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 143, in run
    self._import_dependencies()
  File "/home/vagrant/addons/prestashoperpconnect/product_combination.py", line 65, in _import_dependencies
    'prestashop.product.combination.option',
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 173, in _check_dependency
    ext_id
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 1030, in import_record
    importer.run(prestashop_id)
  File "/home/vagrant/addons/prestashoperpconnect/product_combination.py", line 342, in run
    super(ProductCombinationOptionRecordImport, self).run(ext_id)
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 160, in run
    erp_id = self._create(record)
  File "/home/vagrant/addons/prestashoperpconnect/unit/import_synchronizer.py", line 102, in _create
    context=context
  File "/home/vagrant/addons/connector/producer.py", line 43, in create
    record_id = create_original(self, cr, uid, vals, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4444, in create
    record_id = self.pool.get(table).create(cr, user, tocreate[table], context=parent_context)
  File "/home/vagrant/addons/base_custom_attributes/custom_attributes.py", line 312, in create
    return super(attribute_attribute, self).create(cr, uid, vals, context)
  File "/home/vagrant/addons/connector/producer.py", line 43, in create
    record_id = create_original(self, cr, uid, vals, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4444, in create
    record_id = self.pool.get(table).create(cr, user, tocreate[table], context=parent_context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 345, in create
    res = super(ir_model_fields,self).create(cr, user, vals, context)
  File "/home/vagrant/addons/connector/producer.py", line 43, in create
    record_id = create_original(self, cr, uid, vals, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4515, in create
    cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
IntegrityError: duplicate key value violates unique constraint "ir_model_fields_name_model_uniq"
DETAIL:  Key (name, model_id)=(x_Color, 149) already exists.
percevaq commented 9 years ago

Hello: You fix this problem?

Thank