Merge PR #95 into 14.0

Signed-off-by DarioLodeiros
This commit is contained in:
OCA-git-bot
2021-12-18 15:12:49 +00:00
2 changed files with 3 additions and 2 deletions

View File

@@ -19,8 +19,8 @@ class PmsProperty(models.Model):
("mossos", "Mossos_d'esquadra (soon)"),
],
string="Institution",
default="guardia_civil",
help="Institution to send daily guest data.",
required=False,
)
institution_property_id = fields.Char(
string="Institution property id",

View File

@@ -470,4 +470,5 @@ class TravellerReport(models.TransientModel):
@api.model
def send_file_institution_async(self):
for prop in self.env["pms.property"].search([]):
self.with_delay().send_file_institution(prop)
if prop.institution:
self.with_delay().send_file_institution(prop)