itsulu-blog-publisher/addons/itsulu_blog_publisher/data/mail_template_data.xml
Nicholas Riegel 55ef58f3fb fix: use type='html' not type='qweb' for mail template body_html
type='qweb' is not a valid value in Odoo's data-file RNG schema (allowed:
char/int/float/html/xml/file/base64/ref). It caused a misleading
"Element odoo has extra content: data" validation error that aborted the
entire module upgrade. type='html' with t-out/t-foreach/t-if directives
as real XML children is the correct Odoo 17 pattern; body_html renders
with the qweb engine at send time regardless.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 03:02:59 -04:00

49 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<record id="email_template_blog_published" model="mail.template">
<field name="name">Blog Publisher — Post Published Notification</field>
<field name="model_id" ref="model_itsulu_blog_generation_log"/>
<field name="subject">[ITSulu Insights] Blog Post Published: {{ object.blog_post_id.name }}</field>
<field name="email_from">{{ user.email_formatted }}</field>
<field name="auto_delete">True</field>
<field name="body_html" type="html">
<div style="font-family: Arial, sans-serif; line-height: 1.6; max-width: 700px;">
<h2>Blog Post Published</h2>
<p><strong>Title:</strong> <t t-out="object.blog_post_id.name"/></p>
<p><strong>Blog:</strong> <t t-out="object.blog_post_id.blog_id.name"/></p>
<p><strong>URL:</strong> <a t-attf-href="https://itsulu.com{{ object.blog_post_id.website_url }}">https://itsulu.com<t t-out="object.blog_post_id.website_url"/></a></p>
<h3>Social Media Posts — Ready to Post</h3>
<t t-foreach="object.blog_post_id.itsulu_social_id" t-as="social">
<t t-if="social.twitter_post_a">
<h4>Twitter</h4>
<p><t t-out="social.twitter_post_a"/></p>
</t>
<t t-if="social.twitter_post_b">
<h4>Twitter</h4>
<p><t t-out="social.twitter_post_b"/></p>
</t>
<t t-if="social.bluesky_post_a">
<h4>BlueSky</h4>
<p><t t-out="social.bluesky_post_a"/></p>
</t>
<t t-if="social.bluesky_post_b">
<h4>BlueSky</h4>
<p><t t-out="social.bluesky_post_b"/></p>
</t>
<t t-if="social.mastodon_post">
<h4>Mastodon</h4>
<p><t t-out="social.mastodon_post"/></p>
</t>
<t t-if="social.linkedin_post">
<h4>LinkedIn</h4>
<p><t t-out="social.linkedin_post"/></p>
</t>
</t>
</div>
</field>
</record>
</data>
</odoo>