mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Board services in reservation
This commit is contained in:
@@ -333,7 +333,7 @@ class HotelReservation(models.Model):
|
||||
record.service_ids.filtered(lambda r: r.is_board_service == True).unlink()
|
||||
board_services = []
|
||||
board = self.env['hotel.board.service.room.type'].browse(vals['board_service_room_id'])
|
||||
for product in board.service_ids:
|
||||
for line in board.board_service_line_ids:
|
||||
board_services.append((0, False, {
|
||||
'product_id': line.product_id.id,
|
||||
'is_board_service': True,
|
||||
@@ -615,7 +615,6 @@ class HotelReservation(models.Model):
|
||||
@api.onchange('board_service_room_id')
|
||||
def onchange_board_service(self):
|
||||
if self.board_service_room_id:
|
||||
import wdb; wdb.set_trace()
|
||||
board_services = []
|
||||
for line in self.board_service_room_id.board_service_line_ids:
|
||||
product = line.product_id
|
||||
|
||||
@@ -244,7 +244,12 @@
|
||||
<field name="service_ids"
|
||||
context="{'default_ser_room_line': active_id, 'default_folio_id': folio_id}"
|
||||
nolabel="1">
|
||||
<tree string="Services" editable="bottom">
|
||||
<tree string="Services" editable="bottom"
|
||||
decoration-success="is_board_service == True">
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="included_in_room" icon="fa fa-1x fa-bed"
|
||||
name="open_service_lines"
|
||||
attrs="{'invisible':[('is_board_service','=', False)]}" />
|
||||
<!-- <field name="sequence" widget="handle"/> -->
|
||||
<field name="per_day" invisible="1"/>
|
||||
<field name="is_board_service" invisible="1" />
|
||||
|
||||
Reference in New Issue
Block a user