[FIX] workaround infinite loop while duplicating records in lp:673194
bzr revid: ysa@tinyerp.com-20101124094721-h831hkof77cuvaez
This commit is contained in:
committed by
Yogesh Sakhreliya
parent
2bf0a92b7f
commit
2e8ab9079a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user