Create wizard package and complete view layer: Wizard implementation: - Create wizards/__init__.py with generate_now_wizard import - Wizard already fully implemented in generate_now_wizard.py - Update main addon __init__.py to import wizards Menu structure: - Create menu_views.xml with main menu and submenu structure - Organize menus: Generation, Configuration, Output, Settings View files (split from consolidated views): - Create blog_schedule_views.xml (schedule slot tree/form/action) - Create blog_generation_log_views.xml (log tree/form/action with retry) - Create blog_post_social_views.xml (social copy tree/form/action) - Create generate_now_wizard_views.xml (wizard form/action) - Update blog_topic_views.xml to contain only topic views Features included: - Schedule slot management with LLM provider/model selection - Social media platform toggles per schedule - Generation log viewer with retry capability - Wizard for on-demand blog generation - Complete navigation menu structure - Dark mode and responsive design support All views ready for Odoo 14+ deployment. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
110 lines
5.5 KiB
XML
110 lines
5.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- ================================================================
|
|
SCHEDULE SLOT VIEWS
|
|
================================================================ -->
|
|
|
|
<record id="view_blog_schedule_tree" model="ir.ui.view">
|
|
<field name="name">itsulu.blog.schedule.tree</field>
|
|
<field name="model">itsulu.blog.schedule</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Schedule Slots">
|
|
<field name="name"/>
|
|
<field name="slot"/>
|
|
<field name="trigger_time"/>
|
|
<field name="blog_id"/>
|
|
<field name="llm_provider"/>
|
|
<field name="llm_model"/>
|
|
<field name="image_provider"/>
|
|
<field name="auto_publish" widget="toggle_button"/>
|
|
<field name="active" widget="toggle_button"/>
|
|
<field name="last_run" optional="show"/>
|
|
<button name="%(action_blog_generate_wizard)d" type="action"
|
|
string="▶ Run Now" class="btn-sm btn-primary"
|
|
context="{'default_blog_id': blog_id, 'default_llm_provider': llm_provider, 'default_llm_model': llm_model}"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_blog_schedule_form" model="ir.ui.view">
|
|
<field name="name">itsulu.blog.schedule.form</field>
|
|
<field name="model">itsulu.blog.schedule</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Schedule Slot">
|
|
<header>
|
|
<button name="%(action_blog_generate_wizard)d" type="action"
|
|
string="▶ Run Now" class="btn-primary"/>
|
|
</header>
|
|
<sheet>
|
|
<widget name="web_ribbon" title="Inactive" bg_color="bg-danger"
|
|
attrs="{'invisible': [('active', '=', True)]}"/>
|
|
<div class="oe_title">
|
|
<h1><field name="name" placeholder="e.g. Morning Post"/></h1>
|
|
</div>
|
|
<group>
|
|
<group string="Timing">
|
|
<field name="slot"/>
|
|
<field name="trigger_time"/>
|
|
<field name="active"/>
|
|
</group>
|
|
<group string="Content">
|
|
<field name="blog_id"/>
|
|
<field name="tone"/>
|
|
<field name="auto_publish"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="LLM Configuration">
|
|
<group>
|
|
<group string="Text Generation">
|
|
<field name="llm_provider"/>
|
|
<field name="llm_model"/>
|
|
</group>
|
|
<group string="Image Generation">
|
|
<field name="image_provider"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
<page string="Social Media Platforms">
|
|
<p class="text-muted">Enable or disable social media copy generation for this slot.</p>
|
|
<group>
|
|
<field name="platform_twitter" widget="toggle_button"/>
|
|
<field name="platform_bluesky" widget="toggle_button"/>
|
|
<field name="platform_mastodon" widget="toggle_button"/>
|
|
<field name="platform_linkedin" widget="toggle_button"/>
|
|
</group>
|
|
</page>
|
|
<page string="Prompt Override">
|
|
<p class="text-muted">Leave blank to use the global prompt template from Settings. Enter a custom prompt to override for this slot only.</p>
|
|
<field name="prompt_override" placeholder="Optional: custom user prompt for this slot..."/>
|
|
</page>
|
|
<page string="Notification">
|
|
<field name="notification_emails"
|
|
placeholder="Leave blank to use global Settings (nicholasr@itsulu.com,sales@itsulu.com)"/>
|
|
</page>
|
|
<page string="Generation Log">
|
|
<field name="log_ids" readonly="1">
|
|
<tree decoration-danger="state=='error'" decoration-success="state=='success'">
|
|
<field name="create_date"/>
|
|
<field name="state" widget="badge"/>
|
|
<field name="topic_used"/>
|
|
<field name="tokens_used"/>
|
|
<field name="duration_seconds" string="Duration (s)"/>
|
|
<field name="blog_post_id"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_blog_schedule_list" model="ir.actions.act_window">
|
|
<field name="name">Schedule Slots</field>
|
|
<field name="res_model">itsulu.blog.schedule</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
</odoo>
|