removed debug logs, fixed product barcode scanning

bzr revid: fva@openerp.com-20120509094438-0vibc269r3ayb6ta
This commit is contained in:
Frédéric van der Essen 2012-05-09 11:44:38 +02:00
parent f638ce36cf
commit 8a09bcf83e
4 changed files with 2 additions and 10 deletions

View File

@ -17,7 +17,7 @@ function openerp_pos_devices(module, instance){ //module is instance.point_of_sa
module.ProxyDevice = instance.web.Class.extend({
//a product has been scanned and recognized with success
scan_item_succes: function(){
scan_item_success: function(){
console.log('PROXY: scan item success');
},
@ -323,16 +323,12 @@ function openerp_pos_devices(module, instance){ //module is instance.point_of_sa
title: "Warning",
});
}else if(parse_result.type in {'unit':'', 'weight':'', 'price':''}){ //ean is associated to a product
console.log('calling product callback');
if(self.action_callback['product']){
console.log('found product callback');
self.action_callback['product'](parse_result);
}
//this.trigger("codebar",parse_result );
}else{
console.log('calling callback:',parse_result.type);
if(self.action_callback[parse_result.type]){
console.log('found callback');
self.action_callback[parse_result.type](parse_result);
}
}

View File

@ -284,7 +284,6 @@ function openerp_pos_models(module, instance){ //module is instance.point_of_sal
},
initialize: function(attributes) {
this.pos = attributes.pos;
console.log(attributes);
Backbone.Model.prototype.initialize.apply(this, arguments);
if(attributes.weight){

View File

@ -119,7 +119,6 @@ function openerp_pos_screens(module, instance){ //module is instance.point_of_sa
if(this.current_mode === 'client'){
this.set_current_screen(selectedOrder.get('client_screen') || this.default_client_screen);
}else if(this.current_mode === 'cashier'){
console.log('default_cashier_screen:',this.default_cashier_screen);
this.set_current_screen(selectedOrder.get('cashier_screen') || this.default_cashier_screen);
}
this.selected_order = selectedOrder;
@ -228,7 +227,6 @@ function openerp_pos_screens(module, instance){ //module is instance.point_of_sa
this.pos.barcode_reader.save_callbacks();
this.pos.barcode_reader.reset_action_callbacks();
console.log('actionz callbacks zwave been resetses');
this.pos.barcode_reader.set_action_callbacks({
'cashier': function(ean){
clearInterval(this.intervalID);
@ -699,7 +697,6 @@ function openerp_pos_screens(module, instance){ //module is instance.point_of_sa
return this.$element.find('#paymentlines');
},
back: function() {
console.log('back');
this.pos.screen_selector.set_current_screen('products');
},
validateCurrentOrder: function() {

View File

@ -957,7 +957,7 @@ function openerp_pos_widgets(module, instance){ //module is instance.point_of_sa
//FIXME this method is probably not at the right place ...
scan_product: function(parsed_ean){
var selectedOrder = this.pos.get('selectedOrder');
var scannedProductModel = this.get_product_by_ean(parsed_ean.ean);
var scannedProductModel = this.get_product_by_ean(parsed_ean);
if (!scannedProductModel){
return false;
} else {