Commit d97233bd authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_base: MailMessage_sendByActivy can be retried

As since the introduction of Internet Message Post it is more likely that
conflicts happen. Also, this operation is now safe as sending email in
Entity_sendEmail is made transactionally (as the interaction with MailHost
is done through the creation of an activity)
parent 71268907
# We do not want to retry those activities, as sending email is not transactional safe
activate_kw = kw.pop('activate_kw', {})
activate_kw['max_retry'] = 0
activate_kw['conflict_retry'] = False
context.getPortalObject().portal_catalog.searchAndActivate(
method_id="Entity_sendEmail",
destination_related_uid=context.getUid(),
method_kw=method_kw,
activate_kw=activate_kw,
activate_kw=kw.pop('activate_kw', {}),
**kw)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment