[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; ```
Showing
- addons/mail/wizard/mail_compose_message.py 9 additions, 1 deletionaddons/mail/wizard/mail_compose_message.py
- addons/test_mail/tests/test_mail_message.py 3 additions, 1 deletionaddons/test_mail/tests/test_mail_message.py
- addons/web/static/src/xml/base.xml 1 addition, 1 deletionaddons/web/static/src/xml/base.xml
- odoo/addons/base/models/ir_attachment.py 2 additions, 2 deletionsodoo/addons/base/models/ir_attachment.py
Loading
Please register or sign in to comment