summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-06-21 12:18:40 +0200
committerChristophe Simonis <chs@odoo.com>2018-06-21 12:18:40 +0200
commit68326b15f90b9b6d421593a85ee23546bd7e0e6d (patch)
tree2e60717e7fd29d91b2a75060d9fd6ce053dae9de /addons/web/static/src/js/fields/basic_fields.js
parent512dab4500c827a54f17802220390f132faf63c4 (diff)
parentc5ed37297098c48bf6a89a2175127541ad1f5da3 (diff)
[MERGE] forward port branch 11.0 up to c5ed3729709
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js
index fed57c8b178..933111f6202 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -2446,6 +2446,21 @@ var AceEditor = DebouncedField.extend({
//--------------------------------------------------------------------------
/**
+ * Format value
+ *
+ * Note: We have to overwrite this method to always return a string.
+ * AceEditor works with string and not boolean value.
+ *
+ * @override
+ * @private
+ * @param {boolean|string} value
+ * @returns {string}
+ */
+ _formatValue: function (value) {
+ return this._super.apply(this, arguments) || '';
+ },
+
+ /**
* @override
* @private
*/
@@ -2467,6 +2482,7 @@ var AceEditor = DebouncedField.extend({
this.aceSession.setValue(newValue);
}
},
+
/**
* Starts the ace library on the given DOM element. This initializes the
* ace editor option according to the edit/readonly mode and binds ace