[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
This commit is contained in:
Juan Carlos Montoya 2015-12-15 10:46:37 +01:00 committed by Joren Van Onder
parent 398b93c27c
commit 2fa03885ed
1 changed files with 1 additions and 1 deletions

View File

@ -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();