changes
This commit is contained in:
@@ -4,19 +4,21 @@
|
||||
<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"/>
|
||||
<list string="Match History" default_order="proposed_at desc">
|
||||
<field name="proposed_at" string="Date"/>
|
||||
<field name="session_id" string="Session"/>
|
||||
<field name="tool_display_name" string="Tool"/>
|
||||
<field name="tool_name" string="Tool (Code)" optional="hide"/>
|
||||
<field name="decision" widget="badge"
|
||||
decoration-success="decision == 'approved'"
|
||||
decoration-success="decision in ('approved', 'auto')"
|
||||
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"/>
|
||||
decoration-warning="decision == 'pending'"/>
|
||||
<field name="ai_confidence" string="Confidence" widget="progressbar"/>
|
||||
<field name="amount" string="Amount"/>
|
||||
<field name="partner_id" string="Partner"/>
|
||||
<field name="ai_reasoning" string="Reasoning" optional="hide"/>
|
||||
<field name="decided_by" string="Decided By" optional="hide"/>
|
||||
<field name="decided_at" string="Decided At" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
@@ -33,32 +35,63 @@
|
||||
<button name="action_reject" string="Reject" type="object"
|
||||
class="btn-danger" invisible="decision != 'pending'"
|
||||
groups="fusion_accounting.group_fusion_accounting_manager"/>
|
||||
<field name="decision" widget="statusbar"
|
||||
statusbar_visible="pending,approved,rejected,auto"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title mb-3">
|
||||
<h1>
|
||||
<field name="tool_display_name" readonly="1"/>
|
||||
</h1>
|
||||
<div class="text-muted small">
|
||||
Internal: <field name="tool_name" readonly="1" class="d-inline"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="tool_name"/>
|
||||
<field name="decision"/>
|
||||
<field name="ai_confidence"/>
|
||||
<group string="Request Details">
|
||||
<field name="session_id"/>
|
||||
<field name="proposed_at" string="When"/>
|
||||
<field name="ai_confidence" widget="progressbar" string="Confidence"/>
|
||||
<field name="amount"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="rule_id" invisible="not rule_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="session_id"/>
|
||||
<field name="rule_id"/>
|
||||
<field name="proposed_at"/>
|
||||
<field name="decided_at"/>
|
||||
<group string="Decision">
|
||||
<field name="decided_by"/>
|
||||
<field name="decided_at"/>
|
||||
<field name="rejection_reason"
|
||||
invisible="decision != 'rejected'"/>
|
||||
</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"/>
|
||||
|
||||
<notebook>
|
||||
<page string="AI Reasoning" name="reasoning">
|
||||
<field name="ai_reasoning" widget="text"
|
||||
placeholder="No AI reasoning recorded for this tool call."
|
||||
nolabel="1"/>
|
||||
</page>
|
||||
<page string="Parameters" name="params">
|
||||
<field name="tool_params_pretty" widget="text"
|
||||
nolabel="1" readonly="1"/>
|
||||
</page>
|
||||
<page string="Result" name="result">
|
||||
<field name="tool_result_pretty" widget="text"
|
||||
nolabel="1" readonly="1"/>
|
||||
</page>
|
||||
<page string="Correction" name="correction"
|
||||
invisible="decision != 'rejected'">
|
||||
<group>
|
||||
<field name="rejection_reason" string="Why was this rejected?"/>
|
||||
<field name="correct_action" widget="text"
|
||||
string="What should have been done instead?"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
<group string="Linked Records" invisible="not bank_statement_line_id">
|
||||
<field name="bank_statement_line_id"/>
|
||||
<field name="move_line_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
@@ -72,13 +105,19 @@
|
||||
<search>
|
||||
<field name="tool_name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="session_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')]"/>
|
||||
<filter name="auto" string="Auto-Executed" domain="[('decision', '=', 'auto')]"/>
|
||||
<separator/>
|
||||
<filter name="today" string="Today" domain="[('proposed_at', '>=', (context_today()).strftime('%Y-%m-%d'))]"/>
|
||||
<filter name="this_week" string="This Week" domain="[('proposed_at', '>=', (context_today() - datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]"/>
|
||||
<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'}"/>
|
||||
<filter name="group_session" string="Session" domain="[]" context="{'group_by': 'session_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -89,6 +128,7 @@
|
||||
<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="context">{'search_default_today': 1}</field>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user