Skip to content
Snippets Groups Projects
Commit 5e81850e authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[FIX] base: ir_attachment check logic

How to fix mail.template attachments by re-attaching them to some
template:

```sql
with template_attach as
 (select *
    from email_template_attachment_rel
   where attachment_id in (
          select id
            from ir_attachment
           where res_id = 0 and not public and res_model='mail.template')
 )
update ir_attachment a set res_id = ta.email_template_id
                      from template_attach ta
                     where a.id = ta.attachment_id;
```
parent 0ef54895
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment