[FIX] portal: It ask to login even if user already logged in

- options inside the template will not be correct if we set options in start method(template already loaded when start is call), for the correct value of options inside the template we must set it inside willstart

(PR  #22751)
This commit is contained in:
Kishan Gajjar
2018-02-19 10:09:08 +01:00
committed by ged-odoo
parent d070bdf536
commit 90e8da9b4f
@@ -52,7 +52,8 @@ var PortalChatter = Widget.extend({
params: this._messageFetchPrepareParams()
}), this._loadTemplates()
).then(function(result){
self.result = result
self.result = result;
self.options = _.extend(self.options, self.result['options'] || {});
return result;
});
},
@@ -69,7 +70,6 @@ var PortalChatter = Widget.extend({
this.on("change:pager", this, this._renderPager);
this.on("change:domain", this, this._onChangeDomain);
// set options and parameters
this.options = _.extend(this.options, this.result['options'] || {});
this.set('message_count', this.options['message_count']);
this.set('messages', this.preprocessMessages(this.result['messages']));
return this._super.apply(this, arguments);