base_external_referentials fails to create referential ID, cases integrity violation

Bug #880609 reported by Kyle Waid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Fix Released
Undecided
Sébastien BEAU - http://www.akretion.com

Bug Description

This bug does not reproduce in all installations, but I have a test system you can access.

Any type of referential ID fails to create, products, sales, partners, even synchronize. It can create the data, but not the referential. I do not know what causes it, but it makes it impossible to use connector on some installations.

I have also seen on several installations, nearly all, where it fails to create product on the fly. It does not work.
An example

[2011-10-24 03:52:11,029][beginnenwebwinkel] INFO:ext synchro:Created in OpenERP res.partner.address from External Ref with external_id 2 and OpenERP id 4 successfully
[2011-10-24 03:52:11,045][beginnenwebwinkel] ERROR:db.cursor:bad query: insert into "ir_model_data" (id,"noupdate","external_referential_id","name","res_id","date_update","module","model","date_init",create_uid,create_date) values (6905,E'False',E'1',E'res_partner_address/2',5,E'2011-10-24 03:52:11',E'extref/http://www.beginnenwebwinkel.com/',E'res.partner.address',E'2011-10-24 03:52:11',1,now())
Traceback (most recent call last):
  File "/usr/local/openerp/openerp-server/bin/sql_db.py", line 131, in execute
    res = self._obj.execute(query, params)
IntegrityError: duplicate key value violates unique constraint "ir_model_data_module_name_uniq"

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

[2011-10-24 03:47:54,555][beginnenwebwinkel] ERROR:db.cursor:bad query: insert into "ir_model_data" (id,"noupdate","external_referential_id","name","res_id","date_update","module","model","date_init",create_uid,create_date) values (6896,E'False',E'1',E'res_partner/1',43,E'2011-10-24 03:47:54',E'extref/http://www.beginnenwebwinkel.com/',E'res.partner',E'2011-10-24 03:47:54',1,now())Traceback (most recent call last): File "/usr/local/openerp/openerp-server/bin/sql_db.py", line 131, in execute res = self._obj.execute(query, params)IntegrityError: duplicate key value violates unique constraint "ir_model_data_module_name_uniq"duplicate key value violates unique constraint "ir_model_data_module_name_uniq"[2011-10-24 03:47:54,556][beginnenwebwinkel] ERROR:db.cursor:bad query: SELECT "res_country".id FROM "res_country" WHERE (res_country.code = E'NL') ORDER BY nameTraceback (most recent call last): File "/usr/local/openerp/openerp-server/bin/sql_db.py", line 131, in execute res = self._obj.execute(query, params)InternalError: current transaction is aborted, commands ignored until end of transaction block[2011-10-24 03:47:54,557][beginnenwebwinkel] ERROR:web-services:Uncaught exception
Traceback (most recent call last): File "/usr/local/openerp/openerp-server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs) File "/usr/local/openerp/openerp-server/bin/osv/osv.py", line 176, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/openerp/openerp-server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/openerp/addons/magentoerpconnect/magerp_core.py", line 292, in sync_partner
    partner_address_ids = self.pool.get('res.partner.address').ext_import(cr, uid, result_address, inst.id, context={})
  File "/usr/local/openerp/addons/base_external_referentials/external_osv.py", line 278, in ext_import
    vals = self.oevals_from_extdata(cr, uid, external_referential_id, each_row, for_key_field, mapping_lines, defaults, context)
  File "/usr/local/openerp/addons/base_external_referentials/external_osv.py", line 201, in oevals_from_extdata
    raise MappingError(e, each_mapping_line['external_field'])
MappingError: InternalError('current transaction is aborted, commands ignored until end of transaction block\n',)

Changed in magentoerpconnect:
assignee: nobody → Sébastien BEAU - http://www.akretion.com (sebastien.beau)
Revision history for this message
Kyle Waid (midwest) wrote :

In newer versions of connector such as trunk it will create the product, but create it with referential id = 0.

In some installs it will say, WRONG ID FOR BROWSE RECORD.

First it calls sales_order.arguments,

then when it calls catalog_product.info it fails to interperit the response

Kyle Waid (midwest)
Changed in magentoerpconnect:
status: New → Fix Released
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.