[FIX] point_of_sale: prevent the company logo from being cached by the browser by...
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Wed, 10 Sep 2014 11:52:04 +0000 (13:52 +0200)
committerFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Wed, 10 Sep 2014 11:52:04 +0000 (13:52 +0200)
addons/point_of_sale/static/src/js/models.js
addons/web/controllers/main.py

index 2489f04..37e2136 100644 (file)
@@ -330,7 +330,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;
             },
index 48a0d28..5c91def 100644 (file)
@@ -1177,7 +1177,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: