Files
odoo_source/addons/event/tests
Ivan Yelizariev 547274edd1 [FIX] event: properly handle non-existent template
This commit modifies `execute` method to avoid `MissingError` on reading
`template_ref` field.

`template_ref` is a Reference field, which may have id of a deleted record.

https://github.com/odoo/odoo/blob/927890d0178c361ef8d80fe6a1ec2ffaefaf73fd/addons/event/models/event_mail.py#L53

Method `execute` is used by cron.

https://github.com/odoo/odoo/blob/fba13477843d4d36e3e7a9ddd4b0812c9726e20c/addons/event/data/ir_cron_data.xml#L4-L8
https://github.com/odoo/odoo/blob/927890d0178c361ef8d80fe6a1ec2ffaefaf73fd/addons/event/models/event_mail.py#L247-L256

Getting the `MissingError` means blocking processing the whole batch of tickets.

Fix it by ignoring such tickets and logging a warning

https://online.sentry.io/issues/4089773378

closes odoo/odoo#121199

X-original-commit: c61a8fbb7d4338ca362a3d2093e7aa2f973b289c
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-05-12 19:55:10 +02:00
..
…