[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#63047 Taskid: 2336325 X-original-commit: 73bfe794351b2881fed041983b90f3d90025d23e Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user