You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A customer with an existing order/address binding can sometimes fail like this.
Traceback (most recent call last):
File "/opt/odoo/addons/queue_job/controllers/main.py", line 86, in runjob
self._try_perform_job(env, job)
File "/opt/odoo/addons/queue_job/controllers/main.py", line 62, in _try_perform_job
job.perform()
File "/opt/odoo/addons/queue_job/job.py", line 369, in perform
self.result = self.func(*tuple(self.args), **self.kwargs)
File "/opt/odoo/addons/connector_magento/models/magento_binding/common.py", line 52, in import_record
return importer.run(external_id, force=force)
File "/opt/odoo/addons/connector_magento/components/importer.py", line 207, in run
self._import_dependencies()
File "/opt/odoo/addons/connector_magento/models/sale_order/importer.py", line 668, in _import_dependencies
self._import_addresses()
File "/opt/odoo/addons/connector_magento/models/sale_order/importer.py", line 584, in _import_addresses
importer.run(record['customer_id'])
File "/opt/odoo/addons/connector_magento/components/importer.py", line 220, in run
self._after_import(binding)
File "/opt/odoo/addons/connector_magento/models/partner/importer.py", line 153, in _after_import
book.import_addresses(self.external_id, partner_binding.id)
File "/opt/odoo/addons/connector_magento/models/partner/importer.py", line 198, in import_addresses
importer.run(address_id, address_infos=infos)
File "/opt/odoo/addons/connector_magento/models/partner/importer.py", line 372, in run
return super(AddressImporter, self).run(external_id, force=force)
File "/opt/odoo/addons/connector_magento/components/importer.py", line 216, in run
binding = self._create(record)
File "/opt/odoo/addons/connector_magento/models/partner/importer.py", line 402, in _create
return super(AddressImporter, self)._create(data)
File "/opt/odoo/addons/connector_magento/components/importer.py", line 154, in _create
binding = model.create(data)
File "/opt/odoo/addons/connector/producer.py", line 30, in create
record = super(Base, self).create(vals)
File "/opt/odoo/addons/component_event/models/base.py", line 93, in create
record = super(Base, self).create(vals)
File "/usr/local/lib/python2.7/site-packages/odoo/models.py", line 3826, in create
record = self.browse(self._create(old_vals))
File "/usr/local/lib/python2.7/site-packages/odoo/models.py", line 3985, in _create
self.recompute()
File "/usr/local/lib/python2.7/site-packages/odoo/models.py", line 5320, in recompute
recs.browse(ids)._write(dict(vals))
File "/usr/local/lib/python2.7/site-packages/odoo/models.py", line 3646, in _write
cr.execute(query, params + (sub_ids,))
File "/usr/local/lib/python2.7/site-packages/odoo/sql_db.py", line 154, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/odoo/sql_db.py", line 231, in execute
res = self._obj.execute(query, params)
IntegrityError: duplicate key value violates unique constraint "magento_address_odoo_uniq"
DETAIL: Key (backend_id, odoo_id)=(1, 39216) already exists.
Though I don't know what causes it (I haven't been able to replicate it), the solution is basically to just DELETE FROM magento_address WHERE odoo_id = 39216;
The text was updated successfully, but these errors were encountered:
A customer with an existing order/address binding can sometimes fail like this.
Though I don't know what causes it (I haven't been able to replicate it), the solution is basically to just
DELETE FROM magento_address WHERE odoo_id = 39216;
The text was updated successfully, but these errors were encountered: