From 4fabd23818cb96e0e99dda8c3b81dcca773910e6 Mon Sep 17 00:00:00 2001 From: miguelpadin Date: Tue, 25 May 2021 21:38:19 +0200 Subject: [PATCH] [FIX] pms: fix UI errors --- pms_l10n_es/wizards/traveller_report.py | 8 ++++++++ pms_l10n_es/wizards/traveller_report.xml | 11 ++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pms_l10n_es/wizards/traveller_report.py b/pms_l10n_es/wizards/traveller_report.py index 0579b89b9..6700339a7 100644 --- a/pms_l10n_es/wizards/traveller_report.py +++ b/pms_l10n_es/wizards/traveller_report.py @@ -19,6 +19,10 @@ class TravellerReport(models.TransientModel): txt_binary = fields.Binary(string="File Download") txt_message = fields.Char(string="File Preview") + can_be_sent = fields.Boolean( + default=False + ) + def generate_file(self): # get the active property @@ -29,7 +33,11 @@ class TravellerReport(models.TransientModel): # build content content = self.generate_checkin_list(pms_property.id) + if not content: + content = _("There is no guest information to send") + if content: + self.can_be_sent = True # file creation txt_binary = self.env["traveller.report.wizard"].create( { diff --git a/pms_l10n_es/wizards/traveller_report.xml b/pms_l10n_es/wizards/traveller_report.xml index 0680cf196..dcbbb02ea 100644 --- a/pms_l10n_es/wizards/traveller_report.xml +++ b/pms_l10n_es/wizards/traveller_report.xml @@ -6,13 +6,13 @@
+
-
- +
+ + +