summaryrefslogtreecommitdiff
path: root/addons/web_view_editor/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-07-28 13:56:16 +0200
committerChristophe Simonis <chs@odoo.com>2015-07-28 13:56:16 +0200
commit97073e2a7352c158ae03698437fdda9b1e9bf657 (patch)
treebd840aa03f1a25ff942328814223aea7375a79ed /addons/web_view_editor/static/src
parentf1099a6598fc7381ac43af41a13f44b3e7a62874 (diff)
parent51040b6d60eac7a055321b5c33481bb7c4488295 (diff)
[MERGE] forward port of branch saas-6 up to 51040b6
Diffstat (limited to 'addons/web_view_editor/static/src')
-rw-r--r--addons/web_view_editor/static/src/js/view_editor.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web_view_editor/static/src/js/view_editor.js b/addons/web_view_editor/static/src/js/view_editor.js
index d45216ed19a..29d4b642920 100644
--- a/addons/web_view_editor/static/src/js/view_editor.js
+++ b/addons/web_view_editor/static/src/js/view_editor.js
@@ -543,6 +543,8 @@ var ViewEditor = Widget.extend({
var tr = self.get_object_by_id(this.one_object.clicked_tr_id, this.one_object.main_object, [])[0].att_list[0];
var parent_tr = ($(side).prevAll("tr[level=" + String(this.one_object.clicked_tr_level - 1) + "]"))[0];
var field_dataset = new data.DataSetSearch(this, this.model, null, null);
+ if(_.isUndefined(parent_tr))
+ return;
parent_tr = self.get_object_by_id(parseInt($(parent_tr).attr('id').replace(/[^0-9]+/g, '')), this.one_object.main_object, [])[0].att_list[0];
_.each([tr, parent_tr],function(element) {
var value = _.has(_CHILDREN, element) ? element : _.str.include(html_tag, element)?"html_tag":false;
@@ -1019,7 +1021,7 @@ var ViewEditor = Widget.extend({
type_widget.set_value(node.value);
self.add_widget.push(type_widget);
});
- table_selector.find("td[id^=]").attr("width","100px");
+ table_selector.find("td[id^='']").attr("width","100px");
self.add_node_dialog.$el.find('#new_field').click(function() {
var model_data = new data.DataSetSearch(self,'ir.model', null, null);
model_data.read_slice([], {domain: [['model','=', self.model]]}).done(function(result) {