[FIX] point_of_sale: fix some image chaching issues with the receipt logo. Using a random url at each fetch ensures that we don't get cached results

This commit is contained in:
Frederic van der Essen 2014-09-10 13:39:50 +02:00
parent 8ef044616a
commit 3f5f76f246
2 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
self.company_logo.onerror = function(){
logo_loaded.reject();
};
self.company_logo.src = window.location.origin + '/web/binary/company_logo';
self.company_logo.src = window.location.origin + '/web/binary/company_logo'+'?_'+Math.random();
return logo_loaded;
});

View File

@ -1472,7 +1472,7 @@ class Binary(http.Controller):
'/logo',
'/logo.png',
], type='http', auth="none")
def company_logo(self, dbname=None):
def company_logo(self, dbname=None, **kw):
# TODO add etag, refactor to use /image code for etag
uid = None
if request.session.db: