[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:56:24 +02:00
parent 3f5f76f246
commit c3c8276b0f
+1 -3
View File
@@ -257,7 +257,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
// Load the company Logo
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;
@@ -279,13 +278,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;
});