Recursive copy of translations causes infinite loop when there is a cycle in the related fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
Anup(SerpentCS) | ||
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP's Framework R&D |
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_
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_
I have reproduced the problem using release 5.0.15 of the 5.0 branch.
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 12 lines (+2/-0)1 file modifiedbin/osv/orm.py (+2/-0)
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Medium |
milestone: | none → 6.0-rc2 |
status: | New → Confirmed |
Changed in openobject-server: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
assignee: | nobody → Anup (OpenERP) (ach-openerp) |
status: | New → Confirmed |
tags: | added: 5.0 maintenance |
Changed in openobject-addons: | |
importance: | Undecided → Medium |
Thanks for the proposed fix Don! multi_variant, and also removes the need for the overriding copy() in case of circular relationships.
I have use a different strategy to attempt to cover more cases, keeping track (via the context) of already visited records during copy of translations (and copy of data as well!). This solves the issue with product_
The fix has landed in trunk with revision 3055 <email address hidden>
Thanks for reporting!