diff --git a/contract/models/contract_line.py b/contract/models/contract_line.py
index 7c6a2df61..b909f235b 100644
--- a/contract/models/contract_line.py
+++ b/contract/models/contract_line.py
@@ -682,16 +682,19 @@ class ContractLine(models.Model):
rec._prepare_value_for_stop(date_end, manual_renew_needed)
)
if post_message:
- msg = _(
- """Contract line for %(product)s
+ msg = (
+ _(
+ """Contract line for %(product)s
stopped:
- End: %(old_end)s -- %(new_end)s
"""
- ) % {
- "product": rec.name,
- "old_end": old_date_end,
- "new_end": rec.date_end,
- }
+ )
+ % {
+ "product": rec.name,
+ "old_end": old_date_end,
+ "new_end": rec.date_end,
+ }
+ )
rec.contract_id.message_post(body=msg)
else:
rec.write(
@@ -756,18 +759,21 @@ class ContractLine(models.Model):
rec.successor_contract_line_id = new_line
contract_line |= new_line
if post_message:
- msg = _(
- """Contract line for %(product)s
+ msg = (
+ _(
+ """Contract line for %(product)s
planned a successor:
- Start: %(new_date_start)s
- End: %(new_date_end)s
"""
- ) % {
- "product": rec.name,
- "new_date_start": new_line.date_start,
- "new_date_end": new_line.date_end,
- }
+ )
+ % {
+ "product": rec.name,
+ "new_date_start": new_line.date_start,
+ "new_date_end": new_line.date_end,
+ }
+ )
rec.contract_id.message_post(body=msg)
return contract_line
@@ -859,18 +865,21 @@ class ContractLine(models.Model):
is_auto_renew,
post_message=False,
)
- msg = _(
- """Contract line for %(product)s
+ msg = (
+ _(
+ """Contract line for %(product)s
suspended:
- Suspension Start: %(new_date_start)s
- Suspension End: %(new_date_end)s
"""
- ) % {
- "product": rec.name,
- "new_date_start": date_start,
- "new_date_end": date_end,
- }
+ )
+ % {
+ "product": rec.name,
+ "new_date_start": date_start,
+ "new_date_end": date_end,
+ }
+ )
rec.contract_id.message_post(body=msg)
return contract_line
@@ -1028,18 +1037,21 @@ class ContractLine(models.Model):
else:
new_line = rec._renew_extend_line(date_end)
res |= new_line
- msg = _(
- """Contract line for %(product)s
+ msg = (
+ _(
+ """Contract line for %(product)s
renewed:
- Start: %(new_date_start)s
- End: %(new_date_end)s
"""
- ) % {
- "product": rec.name,
- "new_date_start": date_start,
- "new_date_end": date_end,
- }
+ )
+ % {
+ "product": rec.name,
+ "new_date_start": date_start,
+ "new_date_end": date_end,
+ }
+ )
rec.contract_id.message_post(body=msg)
return res