summaryrefslogtreecommitdiff
path: root/addons/web_view_editor/static/src
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-10-02 00:02:48 +0200
committerAntony Lesuisse <al@openerp.com>2012-10-02 00:02:48 +0200
commitf025e0786071a0fa8c1edf54f43e693603b54c77 (patch)
tree63271f292c2dc6c57490922a1a622c9b296d6f5c /addons/web_view_editor/static/src
parent26dbd18f2f84706fa22fd46518b4a7249c07c2ac (diff)
parent4c9e07c538b22b74fe52006c99d082a9cdae635a (diff)
[MERGE] trunk-deferred-write, change r.result into r
bzr revid: al@openerp.com-20121001220248-e40r7wypgzxa3i0a
Diffstat (limited to 'addons/web_view_editor/static/src')
-rw-r--r--addons/web_view_editor/static/src/js/view_editor.js8
1 files changed, 4 insertions, 4 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 1709b5aa8f5..73d07efd5c0 100644
--- a/addons/web_view_editor/static/src/js/view_editor.js
+++ b/addons/web_view_editor/static/src/js/view_editor.js
@@ -456,11 +456,11 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({
var priority = _.detect(self.one_object['arch'], function(val) {return val.view_id == view_id;});
var arch = _.str.sprintf("<?xml version='1.0'?>\n\t <field name='%s' position='after'> </field>", val[1]);
var vals = {'model': self.model, 'name': view_name, 'priority': priority.priority + 1, 'type': "form", 'arch': arch,'inherit_id':self.main_view_id};
- this.dataset.create(vals).then(function(suc) {
- var arch_to_obj = self.parse_xml(arch,suc.result);
+ this.dataset.create(vals).then(function(id) {
+ var arch_to_obj = self.parse_xml(arch,id);
obj.child_id.push(arch_to_obj[0]);
self.one_object['parent_child_id'] = self.parent_child_list(self.one_object['main_object'],[]);
- self.one_object['arch'].push({'view_id':suc.result,"arch":arch,'priority': priority.priority + 1});
+ self.one_object['arch'].push({'view_id':id,"arch":arch,'priority': priority.priority + 1});
self.increase_level(arch_to_obj[0],obj.level+1);
self.render_inherited_view(selected_row,arch_to_obj[0]);
});
@@ -775,7 +775,7 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({
convert_to_utf = convert_to_utf.replace('xmlns="http://www.w3.org/1999/xhtml"', "");
convert_to_utf = '<?xml version="1.0"?>' + convert_to_utf;
arch.arch = convert_to_utf;
- this.dataset.write(this.one_object.clicked_tr_view[0] ,{"arch":convert_to_utf}, function(r) {});
+ this.dataset.write(this.one_object.clicked_tr_view[0] ,{"arch":convert_to_utf});
} else {
this.dataset.unlink([this.one_object.clicked_tr_view[0]]);
}