mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] Police wizard only checkins on booking state
This commit is contained in:
@@ -43,10 +43,10 @@ class PoliceWizard(models.TransientModel):
|
||||
def generate_file(self):
|
||||
company = self.env.user.company_id
|
||||
if company.police_number is not False and company.property_name is not False:
|
||||
lines = self.env['hotel.checkin.partner'].search(
|
||||
[('enter_date',
|
||||
'=',
|
||||
self.download_date)])
|
||||
lines = self.env['hotel.checkin.partner'].search([
|
||||
('enter_date', '=', self.download_date),
|
||||
('state', 'in', ('booking', 'done')),
|
||||
])
|
||||
content = "1|"+company.police_number+"|"+company.property_name.upper()[0:40]
|
||||
content += "|"
|
||||
content += datetime.datetime.now().strftime("%Y%m%d|%H%M")
|
||||
|
||||
Reference in New Issue
Block a user