Files
odoo_source/addons/sale_async_emails/data/ir_cron.xml
T
Antoine Vandevenne (anv) f0016849c1 [ADD] sale_async_emails: allow sending order status emails asynchronously
This commit adds a new module to allow delaying the sending of sales
order confirmation emails, thus removing a performance bottleneck in the
order confirmation flow.

This is particularly useful for "flash" sales in which a large number of
event tickets are sold in a very short time span. When the emails are
scheduled to be sent right away, the email rendering that is part of the
payment post-processing keeps the worker busy. When the system parameter
`sale.async_emails` is set to `True`, the email rendering is delegated
to a cron, allowing the payment post-processing to execute much faster.

task-3782827

closes odoo/odoo#157612

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2024-04-15 16:21:47 +00:00

17 lines
604 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record id="sale_async_emails.cron" model="ir.cron">
<field name="name">Sales: Send pending emails</field>
<field name="model_id" ref="model_sale_order"/>
<field name="state">code</field>
<field name="code">model._cron_send_pending_emails()</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="active">True</field>
</record>
</odoo>