summaryrefslogtreecommitdiff
path: root/addons/website/static/src/xml/website.contentMenu.xml
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2016-08-04 11:55:00 +0200
committerRaphael Collet <rco@openerp.com>2016-08-04 11:55:00 +0200
commitf259e74f8ad12ddb6592712205654b404229ac58 (patch)
tree091c953ba288f2d843c292b0d0987a6427f957c2 /addons/website/static/src/xml/website.contentMenu.xml
parent2870bdac1b83c2077978498b512664a3ccf69cbf (diff)
[FIX] models: avoid recursive `recompute()` in method `unlink()`
This fixes an issue when a one2many computed field is recomputed: all computed lines are created twice. Consider a simple case, where the value of the field is a single line. The execution goes as follows: * invoke `recompute()` * write value `[(5,), (0, 0, vals)]` to the field * command `(5,)`: invoke `unlink()` * delete existing lines * invoke `recompute()` * write value `[(5,), (0, 0, vals)]` to the field * command `(5,)`: invoke `unlink()` * no more existing lines, return * command `(0, 0, vals)`: invoke `create()` * create a new line * mark the field as recomputed * command `(0, 0, vals)`: invoke `create()` * create a new line * mark the field as recomputed There is a recursive call to `recompute()` inside `unlink()` that recomputes the field while it is being written. The fix simply prevents the recursive call to `recompute()`, just like in methods `create()` and `write()`.
Diffstat (limited to 'addons/website/static/src/xml/website.contentMenu.xml')
0 files changed, 0 insertions, 0 deletions