c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #26158
[Bug 795125] Re: import_data() does not work for many2many multiple values on object xml_id
** Changed in: openobject-server
Status: New => Invalid
** Converted to question:
https://answers.launchpad.net/openobject-server/+question/160952
--
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/795125
Title:
import_data() does not work for many2many multiple values on object
xml_id
Status in OpenERP Server:
Invalid
Bug description:
according to the technical memento, you should be able to reference
multiple xml_id in the same field for many2many fields but it does not
work.
this works fine with the database_id
see attached example modules
to recreate the problem:
1) create a BASE system with no demo data
2) install 'import_mod_problem' module first
3) install 'import_mod_problem_data' second to see error
[2011-06-09 16:48:37,163][test_import_error_final] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
File "/home/openerp/openerp6/openobject-server/bin/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/openerp/openerp6/openobject-server/bin/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/openerp/openerp6/openobject-server/bin/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/openerp/openerp6/openobject-server/bin/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
_db, pool = pooler.restart_pool(cr.dbname, update_module=True)
File "/home/openerp/openerp6/openobject-server/bin/pooler.py", line 60, in restart_pool
return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
File "/home/openerp/openerp6/openobject-server/bin/pooler.py", line 39, in get_db_and_pool
addons.load_modules(db, force_demo, status, update_module)
File "/home/openerp/openerp6/openobject-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 "/home/openerp/openerp6/openobject-server/bin/addons/__init__.py", line 748, in load_module_graph
load_init_update_xml(cr, m, idref, mode, kind)
File "/home/openerp/openerp6/openobject-server/bin/addons/__init__.py", line 635, in load_init_update_xml
tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
File "/home/openerp/openerp6/openobject-server/bin/tools/convert.py", line 947, in convert_csv_import
result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
File "/home/openerp/openerp6/openobject-server/bin/osv/orm.py", line 868, in import_data
process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
File "/home/openerp/openerp6/openobject-server/bin/osv/orm.py", line 830, in process_liness
res.append( _get_id(relation, db_id, current_module, mode) )
File "/home/openerp/openerp6/openobject-server/bin/osv/orm.py", line 732, in _get_id
record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
File "/home/openerp/openerp6/openobject-server/bin/tools/misc.py", line 823, in cached_result
result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
File "/home/openerp/openerp6/openobject-server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
raise ValueError('No references to %s.%s' % (module, xml_id))
openobject-server - 6.0.2 - revno 3403
openobject-addons - 6.0.2 - revno 4535
thanks
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/795125/+subscriptions
References