[FIX] point_of_sale: help wasn't always cancelled when popup closed

bzr revid: fva@openerp.com-20120911101830-dvxi9sg5oan5r5nc
This commit is contained in:
Frédéric van der Essen
2012-09-11 12:18:30 +02:00
parent d71e5b45b6
commit 4db2bc0c43
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -311,7 +311,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
module.Product = Backbone.Model.extend({
get_image_url: function(){
return '/web/binary/image?session_id='instance.session.session_id+'&model=product.product&field=image&id='+this.get('id');
return '/web/binary/image?session_id='+instance.session.session_id+'&model=product.product&field=image&id='+this.get('id');
},
});
@@ -65,6 +65,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
},
close_popup: function(){
if(this.current_popup){
this.current_popup.close();
this.current_popup.hide();
this.current_popup = null;
}
@@ -336,6 +337,11 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this.$el.show();
}
},
/* called before hide, when a popup is closed */
close: function(){
},
/* hides the popup. keep in mind that this is called in the initialization pass of the
* pos instantiation, so you don't want to do anything fancy in here */
hide: function(){
if(this.$el){
this.$el.hide();
@@ -352,9 +358,11 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this.$el.find('.button').off('click').click(function(){
self.pos_widget.screen_selector.close_popup();
self.pos.proxy.help_canceled();
});
},
close:function(){
this.pos.proxy.help_canceled();
},
});
module.ChooseReceiptPopupWidget = module.PopUpWidget.extend({