Skip to content
Snippets Groups Projects
Commit f317fedc authored by Somesh Khare's avatar Somesh Khare Committed by Raphael Collet
Browse files

[Fix] ir_translation: fix the problem of base_field object has no attribute...

[Fix] ir_translation: fix the problem of base_field object has no attribute model (Maintenance Case:618054)

Fixes #3859
parent 856eba1d
Branches
Tags
No related merge requests found
......@@ -403,9 +403,9 @@ class ir_translation(osv.osv):
if getattr(f, 'translate', False):
if f.inherited:
parent_id = trans_model.read(cr, uid, [id], [f.related[0]], context=context)[0][f.related[0]][0]
translatable_fields.append({'name': k, 'id': parent_id, 'model': f.base_field.model})
translatable_fields.append({'name': k, 'id': parent_id, 'model': f.base_field.model_name})
domain.insert(0, '|')
domain.extend(['&', ('res_id', '=', parent_id), ('name', '=', "%s,%s" % (f.base_field.model, k))])
domain.extend(['&', ('res_id', '=', parent_id), ('name', '=', "%s,%s" % (f.base_field.model_name, k))])
else:
translatable_fields.append({'name': k, 'id': id, 'model': model })
if len(langs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment