diff --git a/addons/point_of_sale/static/src/js/gui.js b/addons/point_of_sale/static/src/js/gui.js index 20e754b07e5..b9b0b1666cc 100644 --- a/addons/point_of_sale/static/src/js/gui.js +++ b/addons/point_of_sale/static/src/js/gui.js @@ -226,7 +226,7 @@ openerp.point_of_sale.load_gui = function load_gui(instance, module) { var self = this; var ret = new $.Deferred(); if (password) { - this.gui.show_popup('password',{ + this.show_popup('password',{ 'title': _t('Password ?'), confirm: function(pw) { if (pw !== password) { diff --git a/addons/point_of_sale/static/src/js/popups.js b/addons/point_of_sale/static/src/js/popups.js index 7063b5aa7d7..febeab06d8e 100644 --- a/addons/point_of_sale/static/src/js/popups.js +++ b/addons/point_of_sale/static/src/js/popups.js @@ -140,20 +140,13 @@ openerp.point_of_sale.load_popups = function load_popups(instance, module) { this.list = options.list || []; this.renderElement(); - - this.$('.selection-item').click(function(){ - if (options.confirm) { - var item = self.list[parseInt($(this).data('item-index'))]; - item = item ? item.item : item; - options.confirm.call(self,item); - } - }); }, click_item : function(event) { this.gui.close_popup(); if (this.options.confirm) { var item = this.list[parseInt($(event.target).data('item-index'))]; item = item ? item.item : item; + this.options.confirm.call(self,item); } } }); @@ -194,7 +187,7 @@ openerp.point_of_sale.load_popups = function load_popups(instance, module) { var self = this; this._super(options); - this.inputbuffer = '' + options.value || ''; + this.inputbuffer = '' + (options.value || ''); this.renderElement(); this.firstinput = true; },