[FIX] orm.export_data: 'module' column is required when creating external IDs

The 'module' field of ir.model.data is required, so we
we need to set it when auto-generating ir.mode.data
entries. This acts as the namespace of the record.
Because we don't want exported records to look like they
belong to an existing module (and risk being garbage
collected at the next module update), we put these
auto-generated names in a reserved '__export__' module
namespace.

bzr revid: odo@openerp.com-20111004205140-duaww77ng4qmktj2
This commit is contained in:
Olivier Dony 2011-10-04 22:51:40 +02:00
parent edf68f510c
commit bfdbbb51cb
1 changed files with 1 additions and 0 deletions

View File

@ -1053,6 +1053,7 @@ class BaseModel(object):
'name': n,
'model': self._name,
'res_id': r['id'],
'module': '__export__',
})
r = n
else: