diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 414ff1c3302..f4d32985688 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -60,11 +60,9 @@ class pos_config(osv.osv): help="Accounting journal used to post sales entries."), 'iface_self_checkout' : fields.boolean('Self Checkout Mode', help="Check this if this point of sale should open by default in a self checkout mode. If unchecked, OpenERP uses the normal cashier mode by default."), - 'iface_led' : fields.boolean('Help Notification'), 'iface_cashdrawer' : fields.boolean('Cashdrawer Interface'), 'iface_payment_terminal' : fields.boolean('Payment Terminal Interface'), 'iface_electronic_scale' : fields.boolean('Electronic Scale Interface'), - 'iface_barscan' : fields.boolean('BarScan Interface'), 'iface_vkeyboard' : fields.boolean('Virtual KeyBoard Interface'), 'iface_print_via_proxy' : fields.boolean('Print via Proxy'), diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index e40cbc756b8..2079c50be78 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -794,13 +794,11 @@ - - diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index d824d0a043f..a1f6def6bf3 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -28,12 +28,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal this.db = new module.PosLS(); // a database used to store the products and categories this.db.clear('products','categories'); - // pos settings - this.use_scale = false; - this.use_proxy_printer = false; - this.use_virtual_keyboard = false; - this.use_barcode_scanner = false; - // default attributes values. If null, it will be loaded below. this.set({ 'nbr_pending_operations': 0, @@ -132,12 +126,11 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }).pipe(function(configs){ var pos_config = configs[0]; self.set('pos_config', pos_config); - self.use_scale = !!pos_config.iface_electronic_scale; - self.use_proxy_printer = !!pos_config.iface_print_via_proxy; - self.use_virtual_keyboard = !!pos_config.iface_vkeyboard; - self.use_barcode_scanner = !!pos_config.iface_barscan; - self.use_selfcheckout = !!pos_config.iface_self_checkout; - self.use_cashbox = !!pos_config.iface_cashdrawer; + self.iface_electronic_scale = !!pos_config.iface_electronic_scale; + self.iface_print_via_proxy = !!pos_config.iface_print_via_proxy; + self.iface_vkeyboard = !!pos_config.iface_vkeyboard; + self.iface_self_checkout = !!pos_config.iface_self_checkout; + self.iface_cashdrawer = !!pos_config.iface_cashdrawer; return fetch('sale.shop',[],[['id','=',pos_config.shop_id[0]]]); }).pipe(function(shops){ diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index d71199331f3..738eadb08c5 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -276,7 +276,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.pos_widget.set_left_action_bar_visible(this.show_leftpane && !cashier_mode); this.pos_widget.set_cashier_controls_visible(cashier_mode); - if(cashier_mode && this.pos.use_selfcheckout){ + if(cashier_mode && this.pos.iface_self_checkout){ this.pos_widget.client_button.show(); }else{ this.pos_widget.client_button.hide(); @@ -603,7 +603,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.product_list_widget = new module.ProductListWidget(this,{ click_product_action: function(product){ - if(product.get('to_weight') && self.pos.use_scale){ + if(product.get('to_weight') && self.pos.iface_electronic_scale){ self.pos_widget.screen_selector.set_current_screen(self.scale_screen, {product: product}); }else{ self.pos.get('selectedOrder').addProduct(product); @@ -620,7 +620,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.product_categories_widget.reset_category(); this.pos_widget.order_widget.set_numpad_state(this.pos_widget.numpad.state); - if(this.pos.use_virtual_keyboard){ + if(this.pos.iface_vkeyboard){ this.pos_widget.onscreen_keyboard.connect(); } @@ -719,7 +719,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this._super(); var self = this; - if(this.pos.use_cashbox){ + if(this.pos.iface_cashdrawer){ this.pos.proxy.open_cashbox(); } @@ -753,7 +753,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa var currentOrder = this.pos.get('selectedOrder'); this.pos.push_order(currentOrder.exportAsJSON()) - if(this.pos.use_proxy_printer){ + if(this.pos.iface_print_via_proxy){ this.pos.proxy.print_receipt(currentOrder.export_for_printing()); this.pos.get('selectedOrder').destroy(); //finish order and go back to scan screen }else{ diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index f6840e402de..c3bd73ca35a 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -875,7 +875,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa }, default_client_screen: 'welcome', default_cashier_screen: 'products', - default_mode: this.pos.use_selfcheckout ? 'client' : 'cashier', + default_mode: this.pos.iface_self_checkout ? 'client' : 'cashier', }); },