c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #19479
[Bug 673614] Re: Base_external_referential : ID problem with export-import CSV
I did update=all couldnt update
File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/opt/openerp/server/bin/service/web_services.py", line 596, in dispatch
security.check(db,uid,passwd)
File "/opt/openerp/server/bin/service/security.py", line 43, in check
pool = pooler.get_pool(db)
File "/opt/openerp/server/bin/pooler.py", line 79, in get_pool
pool = get_db_and_pool(db_name, force_demo, status, update_module)[1]
File "/opt/openerp/server/bin/pooler.py", line 39, in get_db_and_pool
addons.load_modules(db, force_demo, status, update_module)
File "/opt/openerp/server/bin/addons/__init__.py", line 883, in load_modules
processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
File "/opt/openerp/server/bin/addons/__init__.py", line 719, in load_module_graph
init_module_objects(cr, package.name, modules)
File "/opt/openerp/server/bin/addons/__init__.py", line 420, in init_module_objects
obj.init(cr)
File "/opt/openerp/addons/base_external_referentials/base_external_referentials.py", line 257, in init
cr.execute("update ir_model_data set name = regexp_replace(name, '_([1-9])', E'/\\1') where module ilike 'extref%';")
File "/opt/openerp/server/bin/sql_db.py", line 78, in wrapper
return f(self, *args, **kwargs)
File "/opt/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"
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/673614
Title:
Base_external_referential : ID problem with export-import CSV
Status in Magento Open ERP Connector:
Fix Released
Bug description:
Hi everyone,
Today I needed to tick a checkbox field on 2000+ product in OpenERP
with magentoerpconnect enabled. To do it, I used the easiest method :
a CSV export of all the products with column "Database ID", "Name",
and the field checkbox.
I modified the checkbox field to True in my OpenOffice Calc, and then
I re-imported the CSV in OpenERP.
But I had a very ugly message :
Error trying to import this record :
track_production: True
Error message :
Line 1 : "extref.society_name.product.product_8" contains too many dots. XML ids should not contain dots ! These are used to refer to other modules data, as in module.reference_id
I should precise that I didn't try to import the column "Id". But
after this I did a CSV export with the column "Id" and I effectively
get the value "extref.society_name.product.product_8".
I don't know why I had a bug with a field that was not imported,
probably because it was the field "Id" that is relatively important
for OpenERP.
Anyway, my devs men say to me that this absolutely not normal that we
have an Id with several dots, and so there is several very bad
consequences on the CSV system. For example here, Impossible to modify
a product by update CSV.
I see in Administration / Customization / Database Structure / External Referential / Data two interesting fields : module and XML identifier. For example with the example product, I have
Module : product.product_8
XML identifier : extref.society_name
This quite obvious that the id is generated by
base_external_referential with the concatenation "Module"."XML
identifier". But this is bad because with this approach we have an id
with several dots. I am already surprised that only the CSV system was
compromised.
What do you think?
References