Commit Graph
2 Commits
Author SHA1 Message Date
Thibault Delavallée 2520bfe625 [REF] event: manually update completion of mail schedulers
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
2021-03-24 11:18:47 +00:00
Thibault Delavallée db8f68f683 [MOV] event: cleanup registration code location
Purpose is to ease understanding of code. Ranging chaussettes in the correct
tiroir is important.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:09 +00:00