summaryrefslogtreecommitdiff
path: root/addons/pad/static/src/js
diff options
context:
space:
mode:
authorbat-odoo <bat@odoo.com>2020-11-11 10:50:33 +0000
committerBarad Mahendra <mba@openerp.com>2020-12-08 15:53:14 +0000
commit6a4f2ba16e638c01a7b554bbf65b1d2e75a9e700 (patch)
treed0f6cb24819ac98c4a1220cb3409186608ea1f16 /addons/pad/static/src/js
parent076966fda2edcf1e5225c09b03c6700aa1b1f6e9 (diff)
[FIX] pad: FIX error on pad when switching projects.
Currently, when we have pad issue when we switch the pad to html editor. for Ex: In the Project app with the Collaborative Pad activated, if we create a task and change the Project name multiple times (one having the Collaborative Pad activated while the other not activated), then at one point the Collaborative Pad doesn't show up and it will display object object. issue is due to object value of the url and it was not going to check for the startwith 'http'. So in this commit, When value is json method convert it to the json object so the value must check proper condition for the startsWith(this.value, 'http'). closes odoo/odoo#63046 Taskid: 2336325 X-original-commit: 73bfe794351b2881fed041983b90f3d90025d23e Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/pad/static/src/js')
-rw-r--r--addons/pad/static/src/js/pad.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js
index 5fb90b50a99..02b34f2b725 100644
--- a/addons/pad/static/src/js/pad.js
+++ b/addons/pad/static/src/js/pad.js
@@ -39,6 +39,9 @@ var FieldPad = AbstractField.extend({
this.$(".oe_configured").addClass('d-none');
return Promise.resolve();
}
+ if (this.mode === 'edit' && typeof(this.value) === 'object') {
+ this.value = this.value.toJSON();
+ }
if (this.mode === 'edit' && _.str.startsWith(this.value, 'http')) {
this.url = this.value;
// please close your eyes and look elsewhere...