diff --git a/fusion_helpdesk_central/__manifest__.py b/fusion_helpdesk_central/__manifest__.py index 6adfdbb7..3b21eebe 100644 --- a/fusion_helpdesk_central/__manifest__.py +++ b/fusion_helpdesk_central/__manifest__.py @@ -3,7 +3,7 @@ # License OPL-1 { 'name': 'Fusion Helpdesk Central — Client API Keys', - 'version': '19.0.2.4.1', + 'version': '19.0.2.4.2', 'category': 'Productivity', 'summary': 'Admin UI on the central Odoo for issuing per-client API ' 'keys used by fusion_helpdesk client deployments.', diff --git a/fusion_helpdesk_central/models/helpdesk_ticket.py b/fusion_helpdesk_central/models/helpdesk_ticket.py index 7f49567f..2c4330a3 100644 --- a/fusion_helpdesk_central/models/helpdesk_ticket.py +++ b/fusion_helpdesk_central/models/helpdesk_ticket.py @@ -289,18 +289,23 @@ class HelpdeskTicket(models.Model): def _fc_post_engagement_notice(self, owner_name, findings): """Public chatter message posted when an engagement is sent. - Two purposes: - - Tells the employee (via the entech My Tickets inbox, which only - reads public comments) that their request has been escalated - for approval and who's deciding. - - Captures our reply (findings) on the public thread so the - employee can see what support said — same content the owner - receives in the engagement email, just without the AI summary - (which is a decision-aid for the owner, not the employee). + Mirrors the engagement email body so the chatter shows the same + context the owner is reading: the engineer's reply (findings) + and the summary that's being used for the decision. We skip the + Original Request section that's in the email — the employee + filed the ticket, they already know what they asked for. - Posted via message_post with subtype_xmlid='mail.mt_comment' so - it survives the entech-side _public_messages filter - (message_type='comment' + non-internal subtype). + Critically: uses styled
s instead of
. Odoo + auto-flags
content as "quoted" (data-o-mail-quote- + node="1") and the chatter UI then collapses it behind a "..." + widget — exactly the wrong UX here, since the findings + summary + are the load-bearing content, not throwaway quotation. Plain + divs with the same visual treatment render fully inline. + + Posted with subtype_xmlid='mail.mt_comment' so it passes the + entech-side _public_messages filter (message_type='comment' + + non-internal subtype) and reaches the employee's My Tickets + inbox. """ from markupsafe import Markup, escape self.ensure_one() @@ -309,14 +314,27 @@ class HelpdeskTicket(models.Model): '

Awaiting owner approval from %s. ' 'Their decision will appear here when they reply.

' ) % name_html + # Section 1: our reply (the wizard's findings) text = (findings or '').strip() if text: body += ( - '

Our reply:

' - '
Our reply:

' + '
%s
' - ) % escape(text).replace('\n', '
') + 'background:#f4f8ff; border-radius:4px; ' + 'white-space:pre-wrap;">%s
' + ) % escape(text) + # Section 2: the AI summary the owner is seeing for the decision + summary = (self.x_fc_ai_summary or '').strip() + if summary: + body += ( + '

' + 'Summary sent to the owner:

' + '
%s
' + ) % escape(summary) self.message_post( body=Markup(body), message_type='comment',