The Findings and Summary fields rendered at half-width because their enclosing <group> defaulted to col="2" — Odoo reserves a label column even when the field has nolabel="1", so the textarea was squeezed into the right half of the dialog while the left half sat empty. Switch both groups to col="1" so the field uses the entire group width. Also tag both fields with widget="text" explicitly (it was inferred from the Text field type, but being explicit makes the intent obvious to anyone reading the view) and migrate the button row to a flex div so the helper text aligns with the button vertical center. Bumps fusion_helpdesk_central to 19.0.2.3.1.
115 lines
5.7 KiB
XML
115 lines
5.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright 2026 Nexa Systems Inc.
|
|
License OPL-1
|
|
|
|
The owner-approval engagement wizard, opened from the ticket form
|
|
button OR the list-view bulk server action. Branches on `mode` to
|
|
show either the single-ticket layout (one AI summary field) or the
|
|
bulk layout (an editable line per ticket).
|
|
-->
|
|
<odoo>
|
|
|
|
<record id="view_engagement_wizard_form" model="ir.ui.view">
|
|
<field name="name">fusion.helpdesk.engagement.wizard.form</field>
|
|
<field name="model">fusion.helpdesk.engagement.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Request Owner Approval">
|
|
<field name="mode" invisible="1"/>
|
|
<field name="ticket_id" invisible="1"/>
|
|
|
|
<group>
|
|
<group>
|
|
<field name="owner_name_display" string="Owner"/>
|
|
<field name="owner_email_display" string="Owner Email" widget="email"/>
|
|
</group>
|
|
</group>
|
|
|
|
<div class="alert alert-warning" role="alert"
|
|
invisible="not ai_unavailable">
|
|
<strong>AI summary unavailable.</strong>
|
|
OpenAI didn't return a summary (no API key set, rate limit,
|
|
or network error). Write a quick brief in the Summary
|
|
field below before sending — everything else still works.
|
|
</div>
|
|
|
|
<!--
|
|
Single mode. The user fills findings first, clicks
|
|
Generate Summary, reviews the AI output, edits if needed,
|
|
then Sends. We deliberately don't auto-fire OpenAI on
|
|
open — the AI needs the engineer's analysis to be useful.
|
|
-->
|
|
<group invisible="mode != 'single'">
|
|
<field name="personal_note"
|
|
placeholder="One-line note that appears above the summary in the email…"/>
|
|
</group>
|
|
<!--
|
|
`col="1"` on these single-column groups makes the
|
|
enclosed field span the full group width. The default
|
|
`col="2"` reserves a label column even with nolabel=1,
|
|
which is what was squeezing the textareas into half
|
|
width before. Findings + summary are wide-form inputs
|
|
that deserve all the real estate the dialog has.
|
|
-->
|
|
<group invisible="mode != 'single'" string="1. Your Findings" col="1">
|
|
<field name="findings" nolabel="1"
|
|
widget="text"
|
|
placeholder="What did your investigation surface? Scope, limitations, recommended approach, effort, risks — anything the owner needs to know that the original reporter wouldn't have."/>
|
|
</group>
|
|
<group invisible="mode != 'single'" string="2. Summary to Send" col="1">
|
|
<div class="d-flex align-items-center">
|
|
<button name="action_generate_summary" type="object"
|
|
string="Generate Summary from Findings"
|
|
icon="fa-magic"
|
|
class="btn-secondary"/>
|
|
<span class="text-muted ms-2">
|
|
← click after writing your findings, then review & edit below
|
|
</span>
|
|
</div>
|
|
<field name="ai_summary" nolabel="1"
|
|
widget="text"
|
|
placeholder="Click Generate Summary above, or write the brief yourself. The owner reads this first."/>
|
|
</group>
|
|
|
|
<!--
|
|
Bulk mode: same two-step flow per ticket. Findings +
|
|
Summary editable inline; a single Generate All button
|
|
fans out OpenAI in parallel using each line's findings.
|
|
-->
|
|
<group invisible="mode != 'bulk'">
|
|
<field name="personal_note"
|
|
placeholder="One-line note that appears once at the top of the combined email…"/>
|
|
</group>
|
|
<div class="o_row" colspan="2"
|
|
invisible="mode != 'bulk'">
|
|
<button name="action_generate_all_summaries" type="object"
|
|
string="Generate All Summaries"
|
|
icon="fa-magic"
|
|
class="btn-secondary"/>
|
|
<span class="o_form_label text-muted ms-2">
|
|
← fill in findings per row first, then click to regenerate all summaries in parallel
|
|
</span>
|
|
</div>
|
|
<field name="line_ids" invisible="mode != 'bulk'" nolabel="1">
|
|
<list editable="bottom" create="0" delete="0">
|
|
<field name="ticket_id" readonly="1"/>
|
|
<field name="ticket_name" readonly="1"/>
|
|
<field name="findings"
|
|
placeholder="Your engineering findings for this ticket…"/>
|
|
<field name="ai_summary"
|
|
placeholder="(empty — click Generate All above, or write by hand)"/>
|
|
</list>
|
|
</field>
|
|
|
|
<footer>
|
|
<button name="action_send" type="object"
|
|
string="Send Engagement"
|
|
class="btn-primary"/>
|
|
<button special="cancel" string="Cancel"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|