# -*- 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.', )