From 1ba6aca37d9cb062c563ae988370ad35dcbde2fe Mon Sep 17 00:00:00 2001 From: Frederic van der Essen Date: Tue, 18 Nov 2014 23:07:45 +0100 Subject: [PATCH] [IMP] pos_restaurant: automatically display floors if they have been setup (removed config option) Conflicts: addons/pos_restaurant/restaurant.py addons/pos_restaurant/restaurant_view.xml --- addons/pos_restaurant/restaurant.py | 3 +-- addons/pos_restaurant/restaurant_view.xml | 2 +- addons/pos_restaurant/static/src/js/floors.js | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/pos_restaurant/restaurant.py b/addons/pos_restaurant/restaurant.py index 46affe5..07b61b9 100644 --- a/addons/pos_restaurant/restaurant.py +++ b/addons/pos_restaurant/restaurant.py @@ -103,14 +103,13 @@ class pos_config(osv.osv): _columns = { 'iface_splitbill': fields.boolean('Bill Splitting', help='Enables Bill Splitting in the Point of Sale'), 'iface_printbill': fields.boolean('Bill Printing', help='Allows to print the Bill before payment'), - 'iface_floorplan': fields.boolean('Floor Plan', help='Enable Floor and Tables in the Point of Sale'), + 'iface_orderline_notes': fields.boolean('Orderline Notes', help='Allow custom notes on Orderlines'), 'floor_ids': fields.one2many('restaurant.floor','pos_config_id','Restaurant Floors', help='The restaurant floors served by this point of sale'), 'printer_ids': fields.many2many('restaurant.printer','pos_config_printer_rel', 'config_id','printer_id',string='Order Printers'), } _defaults = { 'iface_splitbill': False, 'iface_printbill': False, - 'iface_floorplan': False, } class pos_order(osv.osv): diff --git a/addons/pos_restaurant/restaurant_view.xml b/addons/pos_restaurant/restaurant_view.xml index 1baacaa..b676db3 100644 --- a/addons/pos_restaurant/restaurant_view.xml +++ b/addons/pos_restaurant/restaurant_view.xml @@ -146,7 +146,7 @@ - + diff --git a/addons/pos_restaurant/static/src/js/floors.js b/addons/pos_restaurant/static/src/js/floors.js index d329aa5..686593e 100644 --- a/addons/pos_restaurant/static/src/js/floors.js +++ b/addons/pos_restaurant/static/src/js/floors.js @@ -18,8 +18,8 @@ function openerp_restaurant_floors(instance,module){ // Make sure they display in the correct order self.floors = self.floors.sort(function(a,b){ return a.sequence - b.sequence; }); - // Ignore floorplan features if no floor specified, or feature deactivated - self.config.iface_floorplan = self.config.iface_floorplan && !!self.floors.length; + // Ignore floorplan features if no floor specified. + self.config.iface_floorplan = !!self.floors.length; }, }); -- 1.7.10.4