summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorjem-odoo <jem@openerp.com>2018-10-25 13:33:20 +0000
committerjem-odoo <jem@openerp.com>2018-12-04 12:48:13 +0000
commit47479401cb3f685788d76abe01d3d2bc21ff11e3 (patch)
treefedaa6b376f0a0f56da727140d58dcf51b95271f /addons/web/static/src/js/views/basic/basic_model.js
parent605e999dc43ed634bf058d55028d76e9e21af678 (diff)
[IMP] rating: introduce the parent mixin
When creating a task, the satisfaction of the project is recomputed even if the task has not rating. This can lead to performance issue: concurrency error in Postgresql can happen if a task is created when somebody else tries to update the project. The satisfaction recomputation will give and concurrency error whereas it will return the same satisfaction percentage, since the task has no rating. The same problem will happens in every modules implementing the rating feature: project, helpdesk and livechat. This problem leads us to create the rating.parent.mixin in order to retrigger the computation only when a new rating appears on the parent object. We also unstore the field to make its computation lazy. Maybe in a near future, this field will be computed in SQL directly. The parent mixin allow us to standardize the behavior to all parent rating models. These optimizations should reduce the number of computation and speed up the task creation. opw-1902502 Task-1903565
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions