Adding the 'Fusion Helpdesk Central' block to General Settings so the three ICP keys the engagement flow reads are configurable from a real form instead of forcing admins to open Technical → System Parameters. Three settings, all wired via config_parameter= so the existing read paths (engagement_wizard, _fc_send_engagement_reminders) keep working unchanged: - fusion_helpdesk_central.openai_api_key (password widget — doesn't render plaintext on the form) - fusion_helpdesk_central.openai_model (default 'gpt-4o-mini') - fusion_helpdesk_central.engagement_reminder_days (default 3, 0 disables the reminder cron entirely) Bumps fusion_helpdesk_central to 19.0.2.2.0. Find under Settings → Fusion Helpdesk Central. The block has two sub-sections: "Owner Approval — AI Summary" (key + model) and "Owner Approval — Reminder Cadence" (days).
46 lines
2.0 KiB
Python
46 lines
2.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1
|
|
"""Settings for fusion_helpdesk_central exposed via General Settings.
|
|
|
|
Surfaces the three ICP keys the engagement flow reads — OpenAI key /
|
|
model / reminder cadence — so admins don't have to dig into Technical →
|
|
System Parameters to set up the AI summary or change the reminder
|
|
window. All three are stored in ir.config_parameter via the
|
|
`config_parameter=` shortcut so the existing read paths
|
|
(engagement_wizard, helpdesk_ticket._fc_send_engagement_reminders)
|
|
continue to work unchanged.
|
|
"""
|
|
from odoo import fields, models
|
|
|
|
|
|
class ResConfigSettings(models.TransientModel):
|
|
_inherit = 'res.config.settings'
|
|
|
|
fhc_openai_api_key = fields.Char(
|
|
string='OpenAI API Key',
|
|
config_parameter='fusion_helpdesk_central.openai_api_key',
|
|
help='Server-side key the engagement wizard uses to generate AI '
|
|
'summaries on Engage. Leave blank to disable AI summaries — '
|
|
'the wizard still works, you just write the brief manually. '
|
|
'Keep secret: anyone with access to System Parameters could '
|
|
'read it back.',
|
|
)
|
|
fhc_openai_model = fields.Char(
|
|
string='OpenAI Model',
|
|
config_parameter='fusion_helpdesk_central.openai_model',
|
|
default='gpt-4o-mini',
|
|
help='OpenAI model used for the engagement summary. Default '
|
|
'gpt-4o-mini balances cost and quality — switch to gpt-4o '
|
|
'or gpt-4o-2024-08-06 if you find summaries too thin.',
|
|
)
|
|
fhc_engagement_reminder_days = fields.Integer(
|
|
string='Reminder After (days)',
|
|
config_parameter='fusion_helpdesk_central.engagement_reminder_days',
|
|
default=3,
|
|
help='Days of inaction before the cron sends a single follow-up '
|
|
'reminder to the owner. Set to 0 to disable reminders '
|
|
'entirely. The cron sends at most one reminder per '
|
|
'engagement regardless of this value.',
|
|
)
|