itsulu-blog-publisher/addons/itsulu_blog_publisher/views/blog_generation_log_views.xml
Nicholas Riegel d0e974a25b port(14.0): mail template -> Jinja2, view attrs -> Odoo 14 domains
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>
2026-05-30 11:31:11 -04:00

88 lines
4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- ================================================================
GENERATION LOG VIEWS
================================================================ -->
<record id="view_blog_generation_log_tree" model="ir.ui.view">
<field name="name">itsulu.blog.generation.log.tree</field>
<field name="model">itsulu.blog.generation.log</field>
<field name="arch" type="xml">
<tree string="Generation Log"
decoration-danger="state=='error'"
decoration-success="state=='success'"
decoration-info="state=='running'">
<field name="create_date" string="Date"/>
<field name="state" widget="badge"/>
<field name="trigger_source"/>
<field name="schedule_slot" optional="show"/>
<field name="topic_used"/>
<field name="llm_provider"/>
<field name="llm_model" optional="show"/>
<field name="tokens_used"/>
<field name="duration_seconds" string="Dur (s)" optional="show"/>
<field name="blog_post_id"/>
</tree>
</field>
</record>
<record id="view_blog_generation_log_form" model="ir.ui.view">
<field name="name">itsulu.blog.generation.log.form</field>
<field name="model">itsulu.blog.generation.log</field>
<field name="arch" type="xml">
<form string="Generation Log" create="false" edit="false">
<header>
<button name="action_retry" type="object" string="↩ Retry Generation"
attrs="{'invisible': [('state', '!=', 'error')]}"
class="btn-warning"
data-test-id="btn-retry-log-form"/>
</header>
<sheet>
<group>
<group string="Result">
<field name="state" widget="badge"/>
<field name="blog_post_id"/>
<field name="error_message" attrs="{'invisible': [('state', '!=', 'error')]}"/>
</group>
<group string="Trigger">
<field name="trigger_source"/>
<field name="schedule_slot"/>
<field name="topic_used"/>
<field name="topic_source"/>
<field name="triggered_by"/>
</group>
</group>
<group>
<group string="LLM">
<field name="llm_provider"/>
<field name="llm_model"/>
<field name="image_provider"/>
<field name="tokens_used"/>
<field name="duration_seconds"/>
</group>
<group string="Social Platforms">
<field name="platform_twitter"/>
<field name="platform_bluesky"/>
<field name="platform_mastodon"/>
<field name="platform_linkedin"/>
</group>
</group>
<notebook>
<page string="Raw LLM Response" groups="base.group_system">
<field name="raw_llm_response" readonly="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="action_blog_generation_log_list" model="ir.actions.act_window">
<field name="name">Generation Log</field>
<field name="res_model">itsulu.blog.generation.log</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_state_group': 1}</field>
</record>
</odoo>