1
# -*- encoding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
5
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation, either version 3 of the License, or
11
# (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
1
22
from osv import osv, fields
3
24
class travel_hostel(osv.osv):
4
_name = 'travel.hostel'
5
_inherit = 'res.partner'
8
'rooms_id': fields.one2many('travel.room', 'hostel_id', 'Rooms'),
9
'quality': fields.char('Quality', size=16),
25
_name = 'travel.hostel'
26
_inherit = 'res.partner'
27
_table = 'res_partner'
29
'rooms_id': fields.one2many('travel.room', 'hostel_id', 'Rooms'),
30
'quality': fields.char('Quality', size=16),
13
34
class travel_airport(osv.osv):
14
_name = 'travel.airport'
16
'name': fields.char('Airport name', size=16),
17
'city': fields.char('City', size=16),
18
'country': fields.many2one('res.country', 'Country')
35
_name = 'travel.airport'
37
'name': fields.char('Airport name', size=16),
38
'city': fields.char('City', size=16),
39
'country': fields.many2one('res.country', 'Country')
22
43
class travel_room(osv.osv):
24
_inherit = 'product.product'
25
_table = 'product_product'
27
'beds': fields.integer('Nbr of Beds'),
28
'view': fields.selection([('sea','Sea'),('street','Street')], 'Room View'),
29
'hostel_id': fields.many2one('travel.hostel', 'Hostel'),
45
_inherit = 'product.product'
46
_table = 'product_product'
48
'beds': fields.integer('Nbr of Beds'),
49
'view': fields.selection([('sea','Sea'),('street','Street')], 'Room View'),
50
'hostel_id': fields.many2one('travel.hostel', 'Hostel'),
32
53
class travel_flight(osv.osv):
33
_name = 'travel.flight'
34
_inherit = 'product.product'
35
_table = 'product_product'
37
'partner_id': fields.many2one('res.partner', 'PArtner'),
38
'date': fields.datetime('Departure Date'),
39
'airport_from': fields.many2one('travel.airport', 'Airport Departure'),
40
'airport_to': fields.many2one('travel.airport', 'Airport Arrival'),
54
_name = 'travel.flight'
55
_inherit = 'product.product'
56
_table = 'product_product'
58
'partner_id': fields.many2one('res.partner', 'PArtner'),
59
'date': fields.datetime('Departure Date'),
60
'airport_from': fields.many2one('travel.airport', 'Airport Departure'),
61
'airport_to': fields.many2one('travel.airport', 'Airport Arrival'),
65
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: