Merge PR #874 into 14.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2022-04-14 15:26:37 +00:00

View File

@@ -103,16 +103,14 @@ class AccountBankingMandate(models.Model):
)
if expired_mandates:
expired_mandates.write({"state": "expired"})
expired_mandates.message_post(
body=_(
"Mandate automatically set to expired after %d months without use."
for mandate in expired_mandates:
mandate.message_post(
body=_(
"Mandate automatically set to expired after %d months without use."
)
% NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY
)
% NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY
)
logger.info(
"%d SDD Mandate set to expired: IDs %s"
% (len(expired_mandates), expired_mandates.ids)
)
logger.info("SDD Mandate set to expired: ID %s" % (mandate.id))
else:
logger.info("0 SDD Mandates had to be set to Expired")