changes
This commit is contained in:
105
fusion_accounting/views/session_views.xml
Normal file
105
fusion_accounting/views/session_views.xml
Normal file
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Session List View -->
|
||||
<record id="view_fusion_session_list" model="ir.ui.view">
|
||||
<field name="name">fusion.accounting.session.list</field>
|
||||
<field name="model">fusion.accounting.session</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="AI Sessions">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state" widget="badge" decoration-success="state == 'active'" decoration-muted="state == 'closed'"/>
|
||||
<field name="ai_provider"/>
|
||||
<field name="ai_model"/>
|
||||
<field name="tool_call_count"/>
|
||||
<field name="create_date"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Session Form View (with basic chat) -->
|
||||
<record id="view_fusion_session_form" model="ir.ui.view">
|
||||
<field name="name">fusion.accounting.session.form</field>
|
||||
<field name="model">fusion.accounting.session</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="AI Session">
|
||||
<header>
|
||||
<button name="action_close_session" string="Close Session" type="object"
|
||||
class="btn-secondary" invisible="state == 'closed'"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="active,closed"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="context_domain"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="ai_provider"/>
|
||||
<field name="ai_model"/>
|
||||
<field name="tool_call_count"/>
|
||||
<field name="token_count_in"/>
|
||||
<field name="token_count_out"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Conversation" name="conversation">
|
||||
<field name="message_ids_json" widget="text" readonly="1"/>
|
||||
</page>
|
||||
<page string="Match History" name="history">
|
||||
<field name="match_history_ids">
|
||||
<list>
|
||||
<field name="tool_name"/>
|
||||
<field name="decision" widget="badge"
|
||||
decoration-success="decision == 'approved'"
|
||||
decoration-danger="decision == 'rejected'"
|
||||
decoration-warning="decision == 'pending'"
|
||||
decoration-info="decision == 'auto'"/>
|
||||
<field name="ai_confidence" widget="progressbar"/>
|
||||
<field name="amount"/>
|
||||
<field name="proposed_at"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Session Search View -->
|
||||
<record id="view_fusion_session_search" model="ir.ui.view">
|
||||
<field name="name">fusion.accounting.session.search</field>
|
||||
<field name="model">fusion.accounting.session</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<filter name="active" string="Active" domain="[('state', '=', 'active')]"/>
|
||||
<filter name="closed" string="Closed" domain="[('state', '=', 'closed')]"/>
|
||||
<separator/>
|
||||
<group>
|
||||
<filter name="group_user" string="User" domain="[]" context="{'group_by': 'user_id'}"/>
|
||||
<filter name="group_state" string="Status" domain="[]" context="{'group_by': 'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Session Action -->
|
||||
<record id="action_fusion_session" model="ir.actions.act_window">
|
||||
<field name="name">AI Sessions</field>
|
||||
<field name="res_model">fusion.accounting.session</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_fusion_session_search"/>
|
||||
<field name="context">{'search_default_active': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No AI sessions yet
|
||||
</p>
|
||||
<p>Start a conversation with Fusion AI from the dashboard.</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user