Purpose of this commit is to remove the "done" field computation. Indeed
it is based on either
* mail_sent field if scheduler is global to the event (before or after
event). This computation is light as this field changes only once
when emails are scheduled and sent;
* status of event registrations compared to all sent communication on
those registrations. This is costly as adding a new registration changes
In this commit we therefore
* rename ``done`` to ``mail_done`` to ease grep and understanding;
* remove ``mail_sent`` as it is integrated within ``done``;
* manually update ``mail_done`` when updating schedulers instead of doing
it through a compute method;
Some code cleaning is performed to make it clearer and easier to understand.
LINKS
Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
16 lines
676 B
XML
16 lines
676 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo><data noupdate="1">
|
|
<!-- Event Mail Scheduler-->
|
|
<record model="ir.cron" forcecreate="True" id="event_mail_scheduler">
|
|
<field name="name">Event: Mail Scheduler</field>
|
|
<field name="model_id" ref="model_event_mail"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model.schedule_communications(autocommit=True)</field>
|
|
<field name="user_id" ref="base.user_root"/>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">hours</field>
|
|
<field name="numbercall">-1</field>
|
|
<field name="doall" eval="False" />
|
|
</record>
|
|
</data></odoo>
|