Previous fix (col=1 on the group) didn't work — Odoo still rendered the group's string as a left-column label inside the form sheet's flow, so the textarea got pushed into a narrow right column. The summary field looked entirely missing because its content split between the button row (on the right) and the textarea (collapsed nowhere visible). Right idiom (lifted from Odoo's own mail.compose.message wizard): WIDE textareas live directly at the form level, not inside <group>. Section titles use <separator string="…"> which renders as a horizontal divider with the label above. The textarea then takes the full sheet width naturally. Same pattern applied to bulk mode for consistency. Also moved Personal Note into the top compact group with Owner / Owner Email since it's a one-line input that belongs with the header info, not pretending to be a wide section. Bumps fusion_helpdesk_central to 19.0.2.3.2.
117 lines
5.6 KiB
XML
117 lines
5.6 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"/>
|
|
|
|
<!--
|
|
Compact "who + note" header in a normal 2-col group.
|
|
Owner is read-only display, Personal Note is short.
|
|
-->
|
|
<group>
|
|
<field name="owner_name_display" string="Owner" readonly="1"/>
|
|
<field name="owner_email_display" string="Owner Email"
|
|
widget="email" readonly="1"/>
|
|
<field name="personal_note"
|
|
placeholder="One-line note that appears above the summary in the email…"/>
|
|
</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>
|
|
|
|
<!--
|
|
Wide textareas live DIRECTLY at the form level (not inside
|
|
a <group>) so they take the full sheet width — the same
|
|
pattern Odoo's mail.compose.message wizard uses for the
|
|
`body` HTML editor. Section titles use <separator>, which
|
|
renders as a horizontal divider with a label above the
|
|
next field. This is the only Odoo 19 idiom that reliably
|
|
gives a full-width textarea inside a wizard dialog.
|
|
-->
|
|
<separator string="1. Your Findings"
|
|
invisible="mode != 'single'"/>
|
|
<field name="findings"
|
|
invisible="mode != 'single'"
|
|
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."/>
|
|
|
|
<separator string="2. Summary to Send"
|
|
invisible="mode != 'single'"/>
|
|
<div class="d-flex align-items-center mb-2"
|
|
invisible="mode != 'single'">
|
|
<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"
|
|
invisible="mode != 'single'"
|
|
nolabel="1"
|
|
widget="text"
|
|
placeholder="Click Generate Summary above, or write the brief yourself. The owner reads this first."/>
|
|
|
|
<!--
|
|
Bulk mode: same two-step flow, per-line. The list view
|
|
is wide by default because list views fill the form
|
|
sheet — no special layout work needed.
|
|
-->
|
|
<separator string="Per-Ticket Findings & Summaries"
|
|
invisible="mode != 'bulk'"/>
|
|
<div class="d-flex align-items-center mb-2"
|
|
invisible="mode != 'bulk'">
|
|
<button name="action_generate_all_summaries" type="object"
|
|
string="Generate All Summaries"
|
|
icon="fa-magic"
|
|
class="btn-secondary"/>
|
|
<span class="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>
|