[IMP] update dotfiles [ci skip]

This commit is contained in:
oca-git-bot
2022-03-30 22:07:30 +02:00
committed by Pedro M. Baeza
parent 0e3fbebbeb
commit e41bfe34a3

View File

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