diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index 675b77345e7..9b286be250e 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -62,11 +62,6 @@ z-index: 999; text-align: center; } -.point-of-sale .loader img{ - position:absolute; - top:50%; - left:50%; -} /* ********* Generic element styling ********* */ diff --git a/addons/point_of_sale/static/src/img/loader.gif b/addons/point_of_sale/static/src/img/loader.gif deleted file mode 100644 index 967288f55af..00000000000 Binary files a/addons/point_of_sale/static/src/img/loader.gif and /dev/null differ diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 94d6a5dc57e..4ab6ee4f5ee 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -791,7 +791,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa template: 'PosWidget', init: function() { this._super(arguments[0],{}); - + + instance.web.blockUI(); + this.pos = new module.PosModel(this.session); this.pos_widget = this; //So that pos_widget's childs have pos_widget set automatically @@ -841,11 +843,11 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa self.screen_selector.show_popup('error', 'Sorry, we could not find any PoS Configuration for this session'); } + instance.web.unblockUI(); self.$('.loader').animate({opacity:0},1500,'swing',function(){self.$('.loader').hide();}); - self.$('.loader img').hide(); }).fail(function(){ // error when loading models data from the backend - self.$('.loader img').hide(); + instance.web.unblockUI(); return new instance.web.Model("ir.model.data").get_func("search_read")([['name', '=', 'action_pos_session_opening']], ['res_id']) .pipe( _.bind(function(res){ return instance.session.rpc('/web/action/load', {'action_id': res[0]['res_id']}) diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 986921af1c5..cb4d90f1671 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -31,7 +31,6 @@