[FIX] web: company image not update when use 'Edit Company data' button

Wrong class selector and must add '#' to force the browser to reload the picture because the picture is in the cache with the previous cache informations.
This commit is contained in:
Christophe Matthieu
2016-09-08 16:17:04 +02:00
parent 8bb4d9df68
commit 2adcf523cf
+2 -2
View File
@@ -59,10 +59,10 @@ return AbstractWebClient.extend({
toggle_bars: function(value) {
this.$('tr:has(td.navbar),.oe_leftbar').toggle(value);
},
update_logo: function() {
update_logo: function(reload) {
var company = session.company_id;
var img = session.url('/web/binary/company_logo' + '?db=' + session.db + (company ? '&company=' + company : ''));
this.$('.oe_logo img').attr('src', '').attr('src', img);
this.$('.o_sub_menu_logo img').attr('src', '').attr('src', img + (reload ? "#" + Date.now() : ''));
this.$('.oe_logo_edit').toggleClass('oe_logo_edit_admin', session.uid === 1);
},
logo_edit: function(ev) {