Odoo Help


Generated xml id belongs to a module that is not installed

martin mueller
on 9/18/13, 3:59 PM 2,734 views

When exporting fields via csv, they get an auto-generated xml id looking like __export__.res_partner_5. This can be used to reimport the fields with new values via csv.

But when I try to use the same xml id in an xml file:

 <record model="res.partner" id="__export__.res_partner_5">
   <field name="is_company" eval="False"/>  

the import fails, because OpenERP validates the xml id by checking if the module "__export__" (the part left of the dot), is an installed module (ir_module_module).

  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\tools\convert.py", line 256, in _test_xml_id
 AssertionError: The ID "__export__.res_partner_5" refers to an uninstalled module

Is this by design?


Andreas Brueckl

--Andreas Brueckl--

| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 9/25/13, 10:46 AM

If entires have been created manually, OpenERP prefixes the XML ID with __export__. if they are exported. Now it depends what you want to accomplish with the import:

  • If you want to create new lines, then you can simply remove the ID field.
  • If you want to update existing entries, I think this is not possible

But when I reimport the file in csv format from within a module (with a "'data': ['res.partner.csv']," section), then it works. It seems that convert_csv_import does not the same things as convert_xml_import in convert.py

martin mueller
on 9/25/13, 3:34 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 9/18/13, 3:59 PM
Seen: 2734 times
Last updated: 3/16/15, 8:10 AM