[FIX] workaround infinite loop while duplicating records in lp:673194

bzr revid: ysa@tinyerp.com-20101124094721-h831hkof77cuvaez
This commit is contained in:
Don Kirkby
2010-11-24 15:17:21 +05:30
committed by Yogesh Sakhreliya
parent 2bf0a92b7f
commit 2e8ab9079a
+2
View File
@@ -4166,6 +4166,8 @@ class orm(orm_template):
old_children = sorted(old_record[field_name])
new_children = sorted(new_record[field_name])
for (old_child, new_child) in zip(old_children, new_children):
if target_obj == self and old_child == old_id:
continue # avoid infinite loop with self-inheritance
# recursive copy of translations here
target_obj.copy_translations(cr, uid, old_child, new_child, context=context)
# and for translatable fields we keep them for copy