summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-08-25 18:23:47 +0200
committerChristophe Simonis <chs@odoo.com>2016-08-25 18:23:47 +0200
commit5c2025a3affdcbcd06c40b2454b70b2d64528a03 (patch)
tree9b2085cca3340d504d983f9e0c49206bf111ce57 /addons/web_editor/static/src/js/backend.js
parent04602995490b623e3e30b88386fe4bc673ce9002 (diff)
parentc578fb792c8fc48ebf1d0a5689d9201813e1004e (diff)
[MERGE] forward port branch 9.0 up to c578fb7
Diffstat (limited to 'addons/web_editor/static/src/js/backend.js')
-rw-r--r--addons/web_editor/static/src/js/backend.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js
index 38f25e42103..468fab0c728 100644
--- a/addons/web_editor/static/src/js/backend.js
+++ b/addons/web_editor/static/src/js/backend.js
@@ -220,9 +220,12 @@ var FieldTextHtml = widget.extend({
this.$translate = $();
return def;
},
+ get_datarecord: function() {
+ return this.view.get_fields_values();
+ },
get_url: function (_attr) {
var src = this.options.editor_url || "/web_editor/field/html";
- var datarecord = this.view.get_fields_values();
+ var datarecord = this.get_datarecord();
var attr = {
'model': this.view.model,
@@ -269,7 +272,6 @@ var FieldTextHtml = widget.extend({
delete datarecord[this.name];
src += "&datarecord="+ encodeURIComponent(JSON.stringify(datarecord));
-
return src;
},
initialize_content: function () {
@@ -384,4 +386,9 @@ core.form_widget_registry
.add('html', FieldTextHtmlSimple)
.add('html_frame', FieldTextHtml);
+return {
+ FieldTextHtmlSimple: FieldTextHtmlSimple,
+ FieldTextHtml: FieldTextHtml,
+};
+
});