mirror of
https://gitlab.com/itsulu-odoo/itsulu-blog-publisher.git
synced 2026-05-30 23:41:23 +00:00
First static porting pass for the Odoo 14.0 branch:
- data/mail_template_data.xml: revert from 17.0 qweb (type="html",
<t t-out>) to Odoo 14 Jinja2 (${...}, % if, % for)
- views: convert 6 Odoo-17-style invisible="state == '...'" attributes
to Odoo 14 attrs="{'invisible': [domain]}" (blog_topic, blog_generation_log)
- PORTING.md: tick completed items, note remaining (data-test-id RNG,
blog.post.content on 14, pytest pinning for Py3.7)
Static pass only — not yet verified on a live Odoo 14 instance.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
50 lines
1.7 KiB
XML
50 lines
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="0">
|
|
|
|
<!-- Odoo 14 renders mail.template with Jinja2 (${...}, % if, % for) -->
|
|
<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"><![CDATA[
|
|
<div style="font-family: Arial, sans-serif; line-height: 1.6; max-width: 700px;">
|
|
<h2>Blog Post Published</h2>
|
|
<p><strong>Title:</strong> ${object.blog_post_id.name}</p>
|
|
<p><strong>Blog:</strong> ${object.blog_post_id.blog_id.name}</p>
|
|
<p><strong>URL:</strong> <a href="https://itsulu.com${object.blog_post_id.website_url}">https://itsulu.com${object.blog_post_id.website_url}</a></p>
|
|
<h3>Social Media Posts — Ready to Post</h3>
|
|
% for social in object.blog_post_id.itsulu_social_id:
|
|
% if social.twitter_post_a:
|
|
<h4>Twitter</h4>
|
|
<p>${social.twitter_post_a}</p>
|
|
% endif
|
|
% if social.twitter_post_b:
|
|
<h4>Twitter</h4>
|
|
<p>${social.twitter_post_b}</p>
|
|
% endif
|
|
% if social.bluesky_post_a:
|
|
<h4>BlueSky</h4>
|
|
<p>${social.bluesky_post_a}</p>
|
|
% endif
|
|
% if social.bluesky_post_b:
|
|
<h4>BlueSky</h4>
|
|
<p>${social.bluesky_post_b}</p>
|
|
% endif
|
|
% if social.mastodon_post:
|
|
<h4>Mastodon</h4>
|
|
<p>${social.mastodon_post}</p>
|
|
% endif
|
|
% if social.linkedin_post:
|
|
<h4>LinkedIn</h4>
|
|
<p>${social.linkedin_post}</p>
|
|
% endif
|
|
% endfor
|
|
</div>
|
|
]]></field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|