summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-06-29 12:46:00 +0200
committerChristophe Simonis <chs@odoo.com>2018-06-29 12:46:00 +0200
commit49edee1f4bd74bc342863d8ef50eb86de0b4c55f (patch)
tree20f449f08ba1f4a548c9cb2d82f67f2545048419 /addons/web/static/src/js/fields/basic_fields.js
parent4a08388492c6667b7f4a11f1397b8557c355b208 (diff)
parentd54a3726eca6ad48d969d5b4a6e559f783809832 (diff)
[MERGE] forward port branch saas-11.4 up to d54a3726eca
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 aa66439143d..cb676871fc5 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -2597,6 +2597,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
*/
@@ -2618,6 +2633,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