diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-06-27 13:41:00 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-06-27 13:41:00 +0200 |
| commit | 40836194c26187738c4a8812f9af8118f5848b90 (patch) | |
| tree | dda24b31648a64a38b331bf545ff3133432725d2 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 5940f41ddc85d9e900bfac1640c064d4e74fa513 (diff) | |
| parent | 12ddec3a7674c71028080f97adf8c7fec3176b65 (diff) | |
[MERGE] forward port branch saas-11.2 up to 12ddec3a767
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 16 |
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 974615f2b5c..dfa779544e2 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -2508,6 +2508,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 */ @@ -2529,6 +2544,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 |
