Files
Odoo-Modules/fusion_helpdesk/views/res_config_settings_views.xml
gsinghpal 396170b438 feat(fusion_helpdesk): owner-approval engagement flow + AI summary + reporting
Ships the design spec at docs/superpowers/specs/2026-05-27-owner-approval-flow-design.md.

What's new on central (fusion_helpdesk_central 19.0.1.2.0 -> 19.0.2.0.0):

- Engagement model: 8 new fields on helpdesk.ticket (state, snapshotted
  owner email/name, single-use UUID4 token, sent/reminded/decided
  timestamps, AI summary, stored-computed turnaround hours).
- Wizard: single + bulk modes on one fusion.helpdesk.engagement.wizard
  TransientModel with a child wizard.line for per-ticket bulk summaries.
  default_get pulls the OpenAI summary on open; AI fan-out for bulk is
  parallel via ThreadPoolExecutor (max 5 workers, 30s overall cap).
- OpenAI client in utils.py — stdlib urllib, 15s per-call timeout, every
  failure collapses to '' so the wizard's manual-summary fallback fires.
- Public portal: /fusion_helpdesk/engagement/<token>/<decision> GET +
  POST, four branded standalone QWeb pages (confirm/done/invalid/error).
  Token is single-use, cleared on confirm. Decision posts a public
  comment attributed to the resolved owner partner; chatter propagates
  to the employee's My Tickets thread per the "fully visible" UX choice.
- Mail templates (single + bulk) with magic-link buttons. Bulk template
  renders one card per ticket, each with its own approve/reject URL.
- Reminder cron: daily, single-shot per engagement, configurable via
  fusion_helpdesk_central.engagement_reminder_days ICP (default 3, 0
  disables).
- Reporting dashboard: pivot/graph/list/kanban over helpdesk.ticket
  filtered to engaged ones, with avg-turnaround measure. Menu lives
  under Helpdesk > Reporting > Owner Engagements.
- Client_key extended with owner_email/owner_name fields; ticket.create
  upserts them from the client-side piggyback (no new sync endpoint).
- 100% coverage on utils + integration tests on wizard, controllers,
  re-engagement, cron, computed turnaround. OpenAI mocked in CI.

What's new on client (fusion_helpdesk 19.0.1.7.1 -> 19.0.2.0.0):

- Two new ICP settings: fusion_helpdesk.owner_email / .owner_name with
  a new "Owner Approval" block in Settings > Fusion Helpdesk.
- controllers/main.py::submit piggybacks both keys on every ticket
  payload so central keeps client_key.owner_email/name fresh
  automatically.

Verified live end-to-end on entech -> nexa: payload upsert, wizard with
mocked AI, action_send, portal GET/POST/GET-again cycle, second click
hits the friendly invalid-token page. Token entropy = 122 bits (UUID4).
2026-05-27 13:03:23 -04:00

65 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1
-->
<odoo>
<record id="res_config_settings_view_form_fhd" model="ir.ui.view">
<field name="name">res.config.settings.view.form.fusion.helpdesk</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<app data-string="Fusion Helpdesk"
string="Fusion Helpdesk"
name="fusion_helpdesk">
<block title="Central Helpdesk Endpoint"
name="fhd_endpoint">
<setting id="fhd_remote_url"
string="Remote URL"
help="Base URL of the Odoo instance running the Helpdesk app.">
<field name="fhd_remote_url" placeholder="https://erp.nexasystems.ca"/>
</setting>
<setting id="fhd_remote_db"
string="Remote Database">
<field name="fhd_remote_db" placeholder="nexamain"/>
</setting>
<setting id="fhd_remote_login"
string="Service Login">
<field name="fhd_remote_login" placeholder="support@nexasystems.ca"/>
</setting>
<setting id="fhd_remote_password"
string="Service Password / API Key">
<field name="fhd_remote_password" password="True"/>
</setting>
<setting id="fhd_remote_team_id"
string="Helpdesk Team ID (optional)">
<field name="fhd_remote_team_id"/>
</setting>
<setting id="fhd_client_label"
string="Client Label"
help="Tag prefixed to every ticket subject so support can identify the source deployment.">
<field name="fhd_client_label" placeholder="ENTECH"/>
</setting>
</block>
<block title="Owner Approval"
name="fhd_owner_approval">
<setting id="fhd_owner_name"
string="Owner Name"
help="Display name of the real decision-maker at your company. Used in approval emails and chatter attribution.">
<field name="fhd_owner_name" placeholder="Jane Doe"/>
</setting>
<setting id="fhd_owner_email"
string="Owner Email"
help="Email of the real decision-maker. Used when central support requests approval for a ticket that needs sign-off. Leave blank to disable approval requests for this deployment.">
<field name="fhd_owner_email" placeholder="owner@yourcompany.com"/>
</setting>
</block>
</app>
</xpath>
</field>
</record>
</odoo>