Models: - ab.ai.bot: service URL, webhook secret, privacy mode, ping/dispatch - ab.ai.directive: full directive lifecycle log with status tracking - ab.ai.log: activity log with level/agent/record linkage - ab.ai.agent.registry: agent list synced from agent service Controllers: - webhook.py: /ai/webhook/callback handles directive_completed, escalation, sweep_findings - health_proxy.py: /ai/health proxies agent service detailed health - approval.py: /ai/chat dispatch, /ai/approval/pending, /ai/approval/respond Security: - group_ai_user (chat) + group_ai_manager (configure, approve, logs) - ir.model.access.csv for all 4 models Views: list/form for bot, directives, logs, registry; main menu with AI brain icon OWL2 frontend: - systray_button.js: brain icon in top bar, status dot, pending approval badge - ai_panel.js: slide-in chat panel, approval workflow, 30s poll for pending items - CSS: slide-in animation, message bubbles, loading dots, approval section Data: 4 cron jobs (ping, registry sync, directive/log cleanup) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
60 lines
2.6 KiB
XML
60 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_ab_ai_bot_form" model="ir.ui.view">
|
|
<field name="name">ab.ai.bot.form</field>
|
|
<field name="model">ab.ai.bot</field>
|
|
<field name="arch" type="xml">
|
|
<form string="AI Bot Configuration">
|
|
<header>
|
|
<button name="action_ping" string="Ping Service" type="object" class="btn-primary"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box"/>
|
|
<widget name="web_ribbon" title="Offline" bg_color="bg-danger"
|
|
attrs="{'invisible': [('status', '!=', 'offline')]}"/>
|
|
<widget name="web_ribbon" title="Online" bg_color="bg-success"
|
|
attrs="{'invisible': [('status', '!=', 'online')]}"/>
|
|
<widget name="web_ribbon" title="Error" bg_color="bg-warning"
|
|
attrs="{'invisible': [('status', '!=', 'error')]}"/>
|
|
<group>
|
|
<group string="Configuration">
|
|
<field name="display_name"/>
|
|
<field name="active" widget="boolean_toggle"/>
|
|
<field name="agent_service_url"/>
|
|
<field name="webhook_secret" password="True"/>
|
|
<field name="privacy_mode"/>
|
|
</group>
|
|
<group string="Status">
|
|
<field name="status" readonly="1"/>
|
|
<field name="last_ping" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
<group string="Notes">
|
|
<field name="notes" nolabel="1" colspan="2"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_ab_ai_bot_list" model="ir.ui.view">
|
|
<field name="name">ab.ai.bot.list</field>
|
|
<field name="model">ab.ai.bot</field>
|
|
<field name="arch" type="xml">
|
|
<list string="AI Bots">
|
|
<field name="display_name"/>
|
|
<field name="agent_service_url"/>
|
|
<field name="privacy_mode"/>
|
|
<field name="status"/>
|
|
<field name="last_ping"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_ab_ai_bot" model="ir.actions.act_window">
|
|
<field name="name">AI Bot Configuration</field>
|
|
<field name="res_model">ab.ai.bot</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
</odoo>
|