Fix
This commit is contained in:
parent
27ae05c050
commit
1d5ace5b49
10
service.py
10
service.py
|
@ -318,24 +318,28 @@ class CreateDailyServices(Wizard):
|
|||
Service = pool.get('hotel.service')
|
||||
Folio = pool.get('hotel.folio')
|
||||
kind = self.start.kind
|
||||
if kind == 'breakfast':
|
||||
|
||||
if kind.category == 'breakfast':
|
||||
dom = [
|
||||
('arrival_date', '<', self.start.date),
|
||||
('departure_date', '>=', self.start.date),
|
||||
('registration_state', '=', 'check_in'),
|
||||
]
|
||||
elif kind == 'lunch':
|
||||
elif kind.category == 'lunch':
|
||||
dom = [
|
||||
('arrival_date', '<', self.start.date),
|
||||
('departure_date', '>', self.start.date),
|
||||
('registration_state', 'in', ['check_in', 'check_out']),
|
||||
]
|
||||
else: # self.kind == 'dinner':
|
||||
elif kind.category == 'dinner':
|
||||
dom = [
|
||||
('arrival_date', '<=', self.start.date),
|
||||
('departure_date', '>', self.start.date),
|
||||
('registration_state', 'in', ['check_in', 'pending']),
|
||||
]
|
||||
if not dom:
|
||||
return 'end'
|
||||
|
||||
folios = Folio.search(dom)
|
||||
|
||||
lines_to_create = []
|
||||
|
|
Loading…
Reference in New Issue