← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

Hello guys,

   I agree with Olivier Dony that it is risky to fix this in 5.0 server. So I have fixed it in product_variant_multi module.
   It has been fixed by revision 4767 ach@xxxxxxxxxxx-20110121095510-29mykmo0hd7qhhyg


Thanks.

** Changed in: openobject-addons
       Status: Confirmed => Fix Released

** Changed in: openobject-addons
    Milestone: None => 5.0.16

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/673194

Title:
  Recursive copy of translations causes infinite loop when there is a
  cycle in the related fields

Status in OpenERP Modules (addons):
  Fix Released
Status in OpenERP Server:
  Fix Released

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.





References