[IMP] pos_restaurant: automatically display floors if they have been setup (removed...
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Tue, 18 Nov 2014 22:07:45 +0000 (23:07 +0100)
committerFrédéric van der Essen <fvdessen@gmail.com>
Wed, 26 Nov 2014 11:18:50 +0000 (12:18 +0100)
Conflicts:
addons/pos_restaurant/restaurant.py
addons/pos_restaurant/restaurant_view.xml

addons/pos_restaurant/restaurant.py
addons/pos_restaurant/restaurant_view.xml
addons/pos_restaurant/static/src/js/floors.js

index 46affe5..07b61b9 100644 (file)
@@ -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):
index 1baacaa..b676db3 100644 (file)
                     <group string="Bar &amp; Restaurant" >
                         <field name="iface_splitbill" />
                         <field name="iface_printbill" />
-                        <field name="iface_floorplan" />
+                        <field name="iface_orderline_notes" />
                         <field name="floor_ids" />
                         <field name="printer_ids" />
                     </group>
index d329aa5..686593e 100644 (file)
@@ -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;
         },
     });