diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-01-09 15:54:16 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-01-09 15:54:16 +0100 |
| commit | 38b201abce19e95e2fdeddc1cf020da2cb260c62 (patch) | |
| tree | fd00e0581ee1972e50baabba3f2738d6b810ebfc /addons/mail/static/src/js | |
| parent | 37700971830a269e5debb0128c576b7e4474f642 (diff) | |
| parent | e671cdcc444e86f9ed413c33017b9c94e00d13d0 (diff) | |
[MERGE] forward port branch saas-14 up to e671cdcc444
Diffstat (limited to 'addons/mail/static/src/js')
| -rw-r--r-- | addons/mail/static/src/js/client_action.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/client_action.js b/addons/mail/static/src/js/client_action.js index fa77674a6b9..2ef2c5075ac 100644 --- a/addons/mail/static/src/js/client_action.js +++ b/addons/mail/static/src/js/client_action.js @@ -244,6 +244,9 @@ var ChatAction = Widget.extend(ControlPanelMixin, { var def3 = this.extended_composer.appendTo(this.$('.o_mail_chat_content')); var def4 = this.searchview.appendTo($("<div>")).then(function () { self.$searchview_buttons = self.searchview.$buttons.contents(); + // manually call do_search to generate the initial domain and filter + // the messages in the default channel + self.searchview.do_search(); }); this.render_sidebar(); @@ -556,7 +559,12 @@ var ChatAction = Widget.extend(ControlPanelMixin, { }); this.domain = result.domain; - this.fetch_and_render_thread(); + if (this.channel) { + // initially (when do_search is called manually), there is no + // channel set yet, so don't try to fetch and render the thread as + // this will be done as soon as the default channel is set + this.fetch_and_render_thread(); + } }, on_post_message: function (message) { |
