[ADD] base_import: add the possibility to import one2many with database id, for users with technical features

bzr revid: dle@openerp.com-20140310101705-2g3e6gp5jd2g8fpc
This commit is contained in:
Denis Ledoux 2014-03-10 11:17:05 +01:00
parent 46e1470987
commit f54fc4f9dc
1 changed files with 2 additions and 0 deletions

View File

@ -114,6 +114,8 @@ class ir_import(orm.TransientModel):
elif field['type'] == 'one2many' and depth:
f['fields'] = self.get_fields(
cr, uid, field['relation'], context=context, depth=depth-1)
if self.pool['res.users'].has_group(cr, uid, 'base.group_no_one'):
f['fields'].append({'id' : '.id', 'name': '.id', 'string': _("Database ID"), 'required': False, 'fields': []})
fields.append(f)