← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 673194] [NEW] Recursive copy of translations causes infinite loop when there is a cycle in the related fields

 

Public bug reported:

If you set up related fields that have a cycle, then duplicating a
record goes into an infinite loop.

For example, install the product_variant_multi module from extra-addons.
It has a relationship from product_product to product_template, and one
from product_template to product_product. Once you've installed it, try
to duplicate one of the products using the Form: Duplicate menu item. It
will go into an infinite loop and never finish. The server will not
respond to SIGINT.

It looks like this problem occurred in revision 2075 of the 5.0 branch
during release 5.0.12. Olivier Dony implemented "proper recursive copy
of translations through one2many relationships during copy()". Before
that, it appears the product_variant_multi module had successfully
avoided problems with the related fields cycle by overriding the
product_product.copy() method and the product_template.copy() method and
using the default parameter to skip one of the relationships in the
cycle. I can't see any way to similarly skip a relationship in the
copy_translations() method.

I have reproduced the problem using release 5.0.15 of the 5.0 branch.

** Affects: openobject-server
     Importance: Undecided
         Status: New

-- 
Recursive copy of translations causes infinite loop when there is a cycle in the related fields
https://bugs.launchpad.net/bugs/673194
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Server: New

Bug description:
If you set up related fields that have a cycle, then duplicating a record goes into an infinite loop.

For example, install the product_variant_multi module from extra-addons. It has a relationship from product_product to product_template, and one from product_template to product_product. Once you've installed it, try to duplicate one of the products using the Form: Duplicate menu item. It will go into an infinite loop and never finish. The server will not respond to SIGINT.

It looks like this problem occurred in revision 2075 of the 5.0 branch during release 5.0.12. Olivier Dony implemented "proper recursive copy of translations through one2many relationships during copy()". Before that, it appears the product_variant_multi module had successfully avoided problems with the related fields cycle by overriding the product_product.copy() method and the product_template.copy() method and using the default parameter to skip one of the relationships in the cycle. I can't see any way to similarly skip a relationship in the copy_translations() method.

I have reproduced the problem using release 5.0.15 of the 5.0 branch.





Follow ups

References