[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
This commit is contained in:
committed by
Frédéric van der Essen
parent
4079c4afa0
commit
1ba6aca37d
@@ -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):
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
<group string="Bar & 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>
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user