[IMP] comments

bzr revid: mat@openerp.com-20131104144427-oyca1g1ti583sq3c
This commit is contained in:
Martin Trigaux 2013-11-04 15:44:27 +01:00
parent 91cf53228b
commit 4d9e140b8c
1 changed files with 2 additions and 1 deletions

View File

@ -5005,7 +5005,7 @@ class BaseModel(object):
elif field_name in self._inherit_fields:
trans_name = self._inherit_fields[field_name][0] + "," + field_name
# get the id of the inherit record
# get the id of the parent record to set the translation
inherit_field_name = self._inherit_fields[field_name][1]
res_id = self.read(cr, uid, [new_id], [inherit_field_name], context=context)[0][inherit_field_name][0]
@ -5019,6 +5019,7 @@ class BaseModel(object):
records = trans_obj.read(cr, uid, trans_ids, context=context)
for record in records:
del record['id']
# remove source to avoid triggering _set_src
del record['source']
record.update({'res_id': res_id})
trans_obj.create(cr, uid, record, context=context)