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')
|
Service = pool.get('hotel.service')
|
||||||
Folio = pool.get('hotel.folio')
|
Folio = pool.get('hotel.folio')
|
||||||
kind = self.start.kind
|
kind = self.start.kind
|
||||||
if kind == 'breakfast':
|
|
||||||
|
if kind.category == 'breakfast':
|
||||||
dom = [
|
dom = [
|
||||||
('arrival_date', '<', self.start.date),
|
('arrival_date', '<', self.start.date),
|
||||||
('departure_date', '>=', self.start.date),
|
('departure_date', '>=', self.start.date),
|
||||||
('registration_state', '=', 'check_in'),
|
('registration_state', '=', 'check_in'),
|
||||||
]
|
]
|
||||||
elif kind == 'lunch':
|
elif kind.category == 'lunch':
|
||||||
dom = [
|
dom = [
|
||||||
('arrival_date', '<', self.start.date),
|
('arrival_date', '<', self.start.date),
|
||||||
('departure_date', '>', self.start.date),
|
('departure_date', '>', self.start.date),
|
||||||
('registration_state', 'in', ['check_in', 'check_out']),
|
('registration_state', 'in', ['check_in', 'check_out']),
|
||||||
]
|
]
|
||||||
else: # self.kind == 'dinner':
|
elif kind.category == 'dinner':
|
||||||
dom = [
|
dom = [
|
||||||
('arrival_date', '<=', self.start.date),
|
('arrival_date', '<=', self.start.date),
|
||||||
('departure_date', '>', self.start.date),
|
('departure_date', '>', self.start.date),
|
||||||
('registration_state', 'in', ['check_in', 'pending']),
|
('registration_state', 'in', ['check_in', 'pending']),
|
||||||
]
|
]
|
||||||
|
if not dom:
|
||||||
|
return 'end'
|
||||||
|
|
||||||
folios = Folio.search(dom)
|
folios = Folio.search(dom)
|
||||||
|
|
||||||
lines_to_create = []
|
lines_to_create = []
|
||||||
|
|
Loading…
Reference in New Issue