1
##############################################################################
3
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
5
# WARNING: This program as such is intended to be used by professional
6
# programmers who take the whole responsability of assessing all potential
7
# consequences resulting from its eventual inadequacies and bugs
8
# End users who are looking for a ready-to-use solution with commercial
9
# garantees and support are strongly adviced to contract a Free Software
12
# This program is Free Software; you can redistribute it and/or
13
# modify it under the terms of the GNU General Public License
14
# as published by the Free Software Foundation; either version 2
15
# of the License, or (at your option) any later version.
17
# This program is distributed in the hope that it will be useful,
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
# GNU General Public License for more details.
22
# You should have received a copy of the GNU General Public License
23
# along with this program; if not, write to the Free Software
24
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
##############################################################################
27
from osv import fields
31
from mx import DateTime
34
from tools import config
39
kot_form = """<?xml version="1.0"?>
40
<form string="Create Kot">
41
<separator colspan="4" string="Do you really want to create the Kot?" />
42
<field name="grouped" />
46
'grouped' : {'string':'Group the kots', 'type':'boolean', 'default': lambda x,y,z: False}
49
ack_form = """<?xml version="1.0"?>
50
<form string="Create Kots">
51
<separator string="Kots created" />
56
res_form= """<?xml version="1.0"?>
57
<form string="Reservation List">
58
<field name="date_start" />
59
<field name="date_end" />
64
'date_start': {'string':'Start Date','type':'datetime','required': True},
65
'date_end': {'string':'End Date','type':'datetime','required': True},
69
result_form = """<?xml version="1.0"?>
70
<form string="Create Kots">
71
<separator string="Reservation List" />
78
def _makeKot(self, cr, uid, data, context):
81
# order_obj = pooler.get_pool(cr.dbname).get('hotel.reservation')
83
# for o in order_obj.browse(cr, uid, data['ids'], context):
84
# for i in o.folio_id:
87
# 'domain': "[('id','in', ["+','.join(map(str,newinv))+"])]",
89
# 'view_type': 'form',
90
# 'view_mode': 'tree,form',
91
# 'res_model': 'hotel_reservation.folio',
93
# 'type': 'ir.actions.act_window'
98
class make_kot(wizard.interface):
102
'result' : {'type' : 'form',
104
'fields' : kot_fields,
105
'state' : [('end', 'Cancel'),('kot', 'Create Kots') ]}
108
'actions' : [_makeKot],
109
'result' : {'type' : 'action',
114
make_kot("hotel.kot.make_kot")
116
class get_reservation_list(wizard.interface):
121
'result' : {'type' : 'form',
123
'fields' : res_field,
124
'state' : [('end', 'Cancel'),('print_report', 'Reservation List') ]}
128
'result' : {'type' : 'print',
129
'report':'hotel.table.res',
133
get_reservation_list("hotel.table.reservation")
b'\\ No newline at end of file'