summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-03-28 16:01:05 +0200
committerChristophe Simonis <chs@odoo.com>2017-03-28 16:01:05 +0200
commite876becada8eca60950cf27c2424bd903198708b (patch)
treec1e76a78d0fb48d88a8402baf4c79e40957f870e /addons/web/static/src/js
parent30dda3faee36488e4822342b25772d1232e1a75c (diff)
parent7bcfa2b52a347861629eb22af832726c6139c5a3 (diff)
[MERGE] forward port branch saas-6 up to 7bcfa2b52a3
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/framework/pyeval.js1
-rw-r--r--addons/web/static/src/js/views/list_view.js8
2 files changed, 6 insertions, 3 deletions
diff --git a/addons/web/static/src/js/framework/pyeval.js b/addons/web/static/src/js/framework/pyeval.js
index 0430aee9274..bcab0b0717f 100644
--- a/addons/web/static/src/js/framework/pyeval.js
+++ b/addons/web/static/src/js/framework/pyeval.js
@@ -852,6 +852,7 @@ function eval_domains (domains, evaluation_context) {
var result_domain = [];
// Normalize only if the first domain is the array ["|"] or ["!"]
var need_normalization = (
+ domains &&
domains.length > 0 &&
domains[0].length === 1 &&
(domains[0][0] === "|" || domains[0][0] === "!")
diff --git a/addons/web/static/src/js/views/list_view.js b/addons/web/static/src/js/views/list_view.js
index 9d758111c15..98462e68493 100644
--- a/addons/web/static/src/js/views/list_view.js
+++ b/addons/web/static/src/js/views/list_view.js
@@ -1027,9 +1027,11 @@ ListView.List = Class.extend( /** @lends instance.web.ListView.List# */{
'[data-id=' + record.get('id') + ']');
}
- var $newRow = $(self.render_record(record));
- $newRow.find('.oe_list_record_selector input').prop('checked', !!$row.find('.oe_list_record_selector input').prop('checked'));
- $row.replaceWith($newRow);
+ if ($row.length) {
+ var $newRow = $(self.render_record(record));
+ $newRow.find('.oe_list_record_selector input').prop('checked', !!$row.find('.oe_list_record_selector input').prop('checked'));
+ $row.replaceWith($newRow);
+ }
},
'add': function (ev, records, record, index) {
var $new_row = $(self.render_record(record));