feat(odoo): add activeblue_ai Odoo 18 module with OWL2 frontend
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>
This commit is contained in:
77
addons/activeblue_ai/views/ab_ai_directive_views.xml
Normal file
77
addons/activeblue_ai/views/ab_ai_directive_views.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_ab_ai_directive_list" model="ir.ui.view">
|
||||
<field name="name">ab.ai.directive.list</field>
|
||||
<field name="model">ab.ai.directive</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="AI Directives" decoration-danger="status == 'failed'" decoration-warning="status == 'pending_approval'">
|
||||
<field name="create_date" string="Date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="message" string="User Message"/>
|
||||
<field name="status"/>
|
||||
<field name="agents_involved"/>
|
||||
<field name="duration_ms" string="ms"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_ab_ai_directive_form" model="ir.ui.view">
|
||||
<field name="name">ab.ai.directive.form</field>
|
||||
<field name="model">ab.ai.directive</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="AI Directive">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="directive_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="status"/>
|
||||
<field name="agents_involved"/>
|
||||
<field name="duration_ms"/>
|
||||
<field name="session_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Message">
|
||||
<field name="message" nolabel="1" readonly="1"/>
|
||||
</group>
|
||||
<group string="AI Reply">
|
||||
<field name="reply" nolabel="1" readonly="1"/>
|
||||
</group>
|
||||
<group string="Escalations" attrs="{'invisible': [('escalations', '=', False)]}">
|
||||
<field name="escalations" nolabel="1" readonly="1"/>
|
||||
</group>
|
||||
<group string="Actions Taken" attrs="{'invisible': [('actions_taken', '=', False)]}">
|
||||
<field name="actions_taken" nolabel="1" readonly="1"/>
|
||||
</group>
|
||||
<group string="Error" attrs="{'invisible': [('error_message', '=', False)]}">
|
||||
<field name="error_message" nolabel="1" readonly="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_ab_ai_directive_search" model="ir.ui.view">
|
||||
<field name="name">ab.ai.directive.search</field>
|
||||
<field name="model">ab.ai.directive</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="user_id"/>
|
||||
<field name="status"/>
|
||||
<filter name="pending_approval" string="Pending Approval" domain="[('status','=','pending_approval')]"/>
|
||||
<filter name="failed" string="Failed" domain="[('status','in',['failed','timeout'])]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_by_user" string="User" context="{'group_by': 'user_id'}"/>
|
||||
<filter name="group_by_status" string="Status" context="{'group_by': 'status'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_ab_ai_directive" model="ir.actions.act_window">
|
||||
<field name="name">AI Directives</field>
|
||||
<field name="res_model">ab.ai.directive</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_ab_ai_directive_search"/>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user