[FIX]pms: check mens move folio_ids in post mens validation error

This commit is contained in:
Darío Lodeiros
2022-06-08 19:00:08 +02:00
parent 566939f07a
commit 3e13df14c8

View File

@@ -349,6 +349,7 @@ class AccountMove(models.Model):
"The total amount of the simplified invoice is higher than the "
"maximum amount allowed for simplified invoices."
)
self.folio_ids.message_post(body=mens)
if self.folio_ids:
self.folio_ids.message_post(body=mens)
raise ValidationError(mens)
return True