openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #01430
Problem with recreating standard-data
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
i get an error while starting the OpenERP-Server (V6.1) with --update=all:
2012-10-16 06:58:00,711 5905 INFO max_61 openerp.modules.loading: module
base: loading base_data.xml
2012-10-16 06:58:00,731 5905 ERROR max_61 openerp.tools.convert: Parse
error in [...]/addons/base/base_data.xml:33:
<record id="ad" model="res.country">
<field name="name">Andorra, Principality of</field>
<field name="code">ad</field>
</record>
Traceback (most recent call last):
File "/home/marvin/dev/workspace/server_61/openerp/tools/convert.py",
line 893, in parse
self._tags[rec.tag](self.cr, rec, n)
File "/home/marvin/dev/workspace/server_61/openerp/tools/convert.py",
line 795, in _tag_record
id = self.pool.get('ir.model.data')._update_dummy(cr, self.uid,
rec_model, module, rec_id2)
File
"/home/marvin/dev/workspace/server_61/openerp/addons/base/ir/ir_model.py",
line 676, in _update_dummy
print self._get_id(cr, uid, module, xml_id)
File "/home/marvin/dev/workspace/server_61/openerp/tools/cache.py",
line 18, in lookup
r = self.lookup(self2, cr, *args)
File "/home/marvin/dev/workspace/server_61/openerp/tools/cache.py",
line 46, in lookup
value = d[key] = self.method(self2, cr, *args)
File
"/home/marvin/dev/workspace/server_61/openerp/addons/base/ir/ir_model.py",
line 648, in _get_id
raise ValueError('No such external ID currently defined in the
system: %s.%s' % (module, xml_id))
ValueError: No such external ID currently defined in the system: base.ad
2012-10-16 06:58:00,734 5905 ERROR max_61 openerp.netsvc: No such
external ID currently defined in the system: base.ad
If you want to generate this error -> follow this steps:
1. I deleted all countries from res.country (which are not important for
my busseness)
2. I added Andorra (code = ad) to res.country
3. Start the server with --update=all
This error raises because the data in object ir.model.data (which is the
relation object between xml data/unittestdata and OpenERP-objects) will
be deleted after/while deleting an related object. If you start the
server with -- update=all the server is searching (in this case) for an
entry with id="ad" and model="res.country". This action does not find
any data. Now the server wants to create an new entry in res.country
(name = Andorra and code = 'ad'), which fails because an unique-contraint
on code in databasetable res_country.
This procedure works with all data, which was automaticaly generated while
module installation.
I think it is a big issue! If i delete standard-data and recreate the
entry i'm not able to update my system anymore!
Kind regards,
Marvin Haß
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iQEcBAEBAgAGBQJQfRVgAAoJELPuL5Oa1N8GlXUIAIcwrJxS7Gk/zI8gGfFd3e5n
H9QMV3oLWsWZOLbr6Xi4dkZwXwSG90myENgIFwTreqdzUci1A7NpbPsNsZdghdc5
xpRuQ2ZbPQ8Hhx9LkWIqxzxy1KDXN5OCoBCBKWPQzB1jBUynYHHifqEq37QQb/ix
gojvgT36ZI8DorD/hOITCMawqniIparOyc3utbFB82nj28aaMXbQBkKqCrCWJIRi
6nqj+Him4dB5tOf/nWRt6/INXywp5+hh5rNdgr0I7dqDA5wRrjmwCFfJP7xMAGBK
HrvXvq8FZBVZKWkiBhsptlIv1/OrONbBPWn0MeRd0T5eG3/mHdOQInv5p7UrKOU=
=sbOX
-----END PGP SIGNATURE-----
Follow ups