Fix
This commit is contained in:
parent
8a89d25999
commit
a5ee365dc0
7
folio.py
7
folio.py
|
@ -248,11 +248,12 @@ class Folio(ModelSQL, ModelView):
|
|||
@classmethod
|
||||
def update_room(cls, room, state):
|
||||
Housekeeping = Pool().get('hotel.housekeeping')
|
||||
hkrooms = Housekeeping.search([
|
||||
hk_rooms = Housekeeping.search([
|
||||
('room', '=', room.id),
|
||||
])
|
||||
# method = getattr(Housekeeping, state)
|
||||
# method([hkrooms])
|
||||
for hk_room in hk_rooms:
|
||||
hk_room.state = state
|
||||
hk_room.save()
|
||||
|
||||
def get_invoice_state(self, name=None):
|
||||
if self.invoice_line:
|
||||
|
|
|
@ -46,7 +46,7 @@ class Housekeeping(Workflow, ModelSQL, ModelView):
|
|||
notes = fields.Text('Notes')
|
||||
check_in_time = fields.Function(fields.Time('Check In Time'), 'get_check_in_time')
|
||||
check_out_time = fields.Function(fields.Time('Check In Time'), 'get_check_out_time')
|
||||
amenities = fields.Funtion(fields.Many2Many('hotel.room-hotel.amenities',
|
||||
amenities = fields.Function(fields.Many2Many('hotel.room-hotel.amenities',
|
||||
'room', 'amenities', 'Amenities'), 'get_amenities')
|
||||
|
||||
@classmethod
|
||||
|
@ -136,7 +136,7 @@ class Housekeeping(Workflow, ModelSQL, ModelView):
|
|||
|
||||
def get_amenities(self, name=None):
|
||||
res = []
|
||||
for ame in room.amenities:
|
||||
for ame in self.room.amenities:
|
||||
res.append(ame.id)
|
||||
return res
|
||||
|
||||
|
|
|
@ -18,14 +18,13 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="cleaning_type" widget="selection"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Tasks" id="tasks">
|
||||
<field name="tasks" colspan="4"/>
|
||||
<field name="tasks" colspan="2"/>
|
||||
<field name="amenities" colspan="2"/>
|
||||
</page>
|
||||
<page string="Info Addtional" id="comments">
|
||||
<group col="1" colspan="2" string="Check List" id="check_list">
|
||||
<field name="check_list" colspan="4"/>
|
||||
</group>
|
||||
<field name="amenities" colspan="2"/>
|
||||
<separator string="Notes" colspan="4" id="configuration_room"/>
|
||||
<separator string="Check List" colspan="4" id="check_list"/>
|
||||
<field name="check_list" colspan="4"/>
|
||||
<separator string="Notes" colspan="4" id="notes"/>
|
||||
<field name="notes" colspan="4"/>
|
||||
</page>
|
||||
<page string="Amenities" id="amenities">
|
||||
|
|
Loading…
Reference in New Issue