From 2fa03885ed3d32563b67baf74ff2005b99074a13 Mon Sep 17 00:00:00 2001 From: Juan Carlos Montoya Date: Tue, 15 Dec 2015 10:46:37 +0100 Subject: [PATCH] [FIX] point_of_sale: make uploading partner images work in Firefox When uploading an image in the client list in the POS with Firefox an error was thrown complaining about event not being defined. jov note: the reason it worked in other browsers like IE and Chrome is that in those browsers `event` resolves to `window.event`. In Firefox this doesn't happen which is why JQuery provides us with the event in the callback function. closes #10078 --- addons/point_of_sale/static/src/js/screens.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index b96af46757c..94794d6a3be 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -893,7 +893,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa contents.append($(QWeb.render('ClientDetailsEdit',{widget:this,partner:partner}))); this.toggle_save_button(); - contents.find('.image-uploader').on('change',function(){ + contents.find('.image-uploader').on('change',function(event){ self.load_image_file(event.target.files[0],function(res){ if (res) { contents.find('.client-picture img, .client-picture .fa').remove();