f259e74f8ad12ddb6592712205654b404229ac58
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()`.
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
If you are a developer you may type the following command at your terminal:
wget -O- https://raw.githubusercontent.com/odoo/odoo/9.0/odoo.py | python
Then follow the developer tutorials
For Odoo employees
To add the odoo-dev remote use this command:
$ ./odoo.py setup_git_dev
To fetch odoo merge pull requests refs use this command:
$ ./odoo.py setup_git_review
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%