[FIX] point_of_sale: chrome was dropping the cookie when loading the company logo, resulting in an incorrect logo in multi-db setups.

This commit is contained in:
Frederic van der Essen 2014-09-10 14:34:58 +02:00
parent ad14acab32
commit 67ffbe00a4
1 changed files with 1 additions and 3 deletions

View File

@ -302,7 +302,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
label: 'pictures',
loaded: function(self){
self.company_logo = new Image();
self.company_logo.crossOrigin = 'anonymous';
var logo_loaded = new $.Deferred();
self.company_logo.onload = function(){
var img = self.company_logo;
@ -324,13 +323,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
ctx.drawImage(self.company_logo,0,0, width, height);
self.company_logo_base64 = c.toDataURL();
window.logo64 = self.company_logo_base64;
logo_loaded.resolve();
};
self.company_logo.onerror = function(){
logo_loaded.reject();
};
self.company_logo.src = window.location.origin + '/web/binary/company_logo' +'?_'+Math.random();
self.company_logo.src = '/web/binary/company_logo' +'?_'+Math.random();
return logo_loaded;
},