summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_renderer.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-05-26 11:36:00 +0200
committerGéry Debongnie <ged@odoo.com>2017-05-26 15:02:31 +0200
commitdcde0aaf30fa52f59341edb274bab02e8e9aea88 (patch)
tree1656e0324fedd623231f7e38c4a440d4bb939447 /addons/web/static/src/js/views/basic/basic_renderer.js
parent9009c5375ee0dec0fdf5c6257065066ef5a3f6f7 (diff)
[FIX] web: recompute decoration classnames when necesssary
Before this commit, row decorations were only computed at the initial rendering for a list view, then never recomputed. Most of the time, it is not an issue, but list view can be edited, and in that case, it may be a problem. With this commit, we just override the confirmChange method to recompute the various decorations. Note that in bonus, decorations now works in realtime, when editing a list view (in saas-15, they simply did not work when editing a record) Also, we now use the same evaluation context as everything else in the web client: the eval context from the record, not some custom handmade context like before.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
-rw-r--r--addons/web/static/src/js/views/basic/basic_renderer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_renderer.js b/addons/web/static/src/js/views/basic/basic_renderer.js
index 2e36a4cac55..8bbf9ae45a4 100644
--- a/addons/web/static/src/js/views/basic/basic_renderer.js
+++ b/addons/web/static/src/js/views/basic/basic_renderer.js
@@ -91,7 +91,7 @@ var BasicRenderer = AbstractRenderer.extend({
var record = state.id === id ? state : _.findWhere(state.data, {id: id});
if (!record) {
- return this._render();
+ return this._render().then(_.constant([]));
}
var defs = [];