diff options
| author | Aaron Bohy <aab@odoo.com> | 2018-02-16 14:11:46 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2018-02-19 13:05:36 +0100 |
| commit | 8aec3c912820de806f36f8868461144951a0b27d (patch) | |
| tree | 4a0e24d88d1bfdf454b206308006626c4abccaea /addons/web/static/src/js/chrome/web_client.js | |
| parent | e242ee5f74bf0677d2e39554c12432c31750cec6 (diff) | |
[FIX] web: WebClient: edit company data
Before this rev., a traceback was raised when the user tried to
edit the company data, by clicking on the company logo in the
submenu (community edition only). This was due to code not being
converted after the ActionManager refactoring of 7b6056a0.
Also ensures that the logo is properly reloaded by specifying the
timestamp in the img url as a query string parameter instead of an
hash param, since changing the hash doesn't seem to be enough to
fool the browser's cache anymore.
Diffstat (limited to 'addons/web/static/src/js/chrome/web_client.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/web_client.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/addons/web/static/src/js/chrome/web_client.js b/addons/web/static/src/js/chrome/web_client.js index d824e3e4176..76aadf49463 100644 --- a/addons/web/static/src/js/chrome/web_client.js +++ b/addons/web/static/src/js/chrome/web_client.js @@ -56,7 +56,7 @@ return AbstractWebClient.extend({ update_logo: function(reload) { var company = session.company_id; var img = session.url('/web/binary/company_logo' + '?db=' + session.db + (company ? '&company=' + company : '')); - this.$('.o_sub_menu_logo img').attr('src', '').attr('src', img + (reload ? "#" + Date.now() : '')); + this.$('.o_sub_menu_logo img').attr('src', '').attr('src', img + (reload ? "&t=" + Date.now() : '')); this.$('.oe_logo_edit').toggleClass('oe_logo_edit_admin', session.is_superuser); }, logo_edit: function(ev) { @@ -80,13 +80,8 @@ return AbstractWebClient.extend({ action_buttons: true, headless: true, }; - self.action_manager.doAction(result).then(function () { - var form = self.action_manager.dialog_widget.views.form.controller; - form.on("on_button_cancel", self.action_manager, self.action_manager.dialog_stop); - form.on('record_saved', self, function() { - self.action_manager.dialog_stop(); - self.update_logo(); - }); + self.action_manager.doAction(result, { + on_close: self.update_logo.bind(self, true), }); }); }); |
