← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 685827] Re: Server ORM bug V5 (copy translation). Error when duplicating product, using product_variant_multi

 

*** This bug is a duplicate of bug 673194 ***
    https://bugs.launchpad.net/bugs/673194

This is a duplicate of bug 673194, which is now fixed, so this issue should not happen anymore.
Thanks for reporting!

I will mark the bug as duplicate, too.

** Changed in: openobject-server/trunk
       Status: Won't Fix => Fix Released

** Changed in: openobject-server/trunk
    Milestone: None => 6.0-rc2

** This bug has been marked a duplicate of bug 673194
   Recursive copy of translations causes infinite loop when there is a cycle in the related fields
 * You can subscribe to bug 673194 by following this link: https://bugs.launchpad.net/openobject-server/+bug/673194/+subscribe

-- 
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/685827

Title:
  Server ORM bug V5 (copy translation). Error when duplicating product, using product_variant_multi

Status in OpenObject Server:
  Confirmed
Status in OpenObject Server 5.0 series:
  Won't Fix
Status in OpenObject Server trunk series:
  Fix Released

Bug description:
  Hi
After installing product_variant_multi (in multilanguage), I can not duplicate anymore a product.
Indeed, If you look in the orm, a recursive function is used to duplicated all of the translation.

In the case of the product_variant_multi, the object "product_product" inherit "product.template" 
Here are the relation between the two object
"product.product"=>product_tmpl_id : many2one=>"product.template" 
"product.template"=>variants_ids : one2many=>"product.product"

Note : the object "product.product" have as field the field "variants_ids" in the list of its fields indeed it inherit the product.template.

When we try to duplicate the translation, we use the recursive method on all many2one and one2many fields.
The first called is done on the object "product.product". As this object have the fields variants_ids which is a related fields (one2many) related to "product.product", the recursive function is called with the same value, and we enter in a infinite loop. By chance the ORM stop the process after X recursion, and raise an error.

I join a patch.

Hope it will help.





References