98 lines
4.6 KiB
XML
98 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_fusion_history_list" model="ir.ui.view">
|
|
<field name="name">fusion.accounting.match.history.list</field>
|
|
<field name="model">fusion.accounting.match.history</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Match History">
|
|
<field name="proposed_at"/>
|
|
<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="partner_id"/>
|
|
<field name="decided_by"/>
|
|
<field name="decided_at"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_fusion_history_form" model="ir.ui.view">
|
|
<field name="name">fusion.accounting.match.history.form</field>
|
|
<field name="model">fusion.accounting.match.history</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Match History">
|
|
<header>
|
|
<button name="action_approve" string="Approve" type="object"
|
|
class="btn-primary" invisible="decision != 'pending'"
|
|
groups="fusion_accounting.group_fusion_accounting_manager"/>
|
|
<button name="action_reject" string="Reject" type="object"
|
|
class="btn-danger" invisible="decision != 'pending'"
|
|
groups="fusion_accounting.group_fusion_accounting_manager"/>
|
|
</header>
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="tool_name"/>
|
|
<field name="decision"/>
|
|
<field name="ai_confidence"/>
|
|
<field name="amount"/>
|
|
<field name="partner_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="session_id"/>
|
|
<field name="rule_id"/>
|
|
<field name="proposed_at"/>
|
|
<field name="decided_at"/>
|
|
<field name="decided_by"/>
|
|
</group>
|
|
</group>
|
|
<group string="AI Details">
|
|
<field name="ai_reasoning"/>
|
|
<field name="tool_params"/>
|
|
<field name="tool_result"/>
|
|
</group>
|
|
<group string="Correction" invisible="decision != 'rejected'">
|
|
<field name="rejection_reason"/>
|
|
<field name="correct_action"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_fusion_history_search" model="ir.ui.view">
|
|
<field name="name">fusion.accounting.match.history.search</field>
|
|
<field name="model">fusion.accounting.match.history</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="tool_name"/>
|
|
<field name="partner_id"/>
|
|
<filter name="pending" string="Pending" domain="[('decision', '=', 'pending')]"/>
|
|
<filter name="approved" string="Approved" domain="[('decision', '=', 'approved')]"/>
|
|
<filter name="rejected" string="Rejected" domain="[('decision', '=', 'rejected')]"/>
|
|
<separator/>
|
|
<group>
|
|
<filter name="group_tool" string="Tool" domain="[]" context="{'group_by': 'tool_name'}"/>
|
|
<filter name="group_decision" string="Decision" domain="[]" context="{'group_by': 'decision'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_fusion_history" model="ir.actions.act_window">
|
|
<field name="name">Match History</field>
|
|
<field name="res_model">fusion.accounting.match.history</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="search_view_id" ref="view_fusion_history_search"/>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">No match history yet</p>
|
|
<p>AI tool calls and their outcomes will appear here.</p>
|
|
</field>
|
|
</record>
|
|
</odoo>
|