# -*- coding: utf-8 -*- # Copyright 2024-2026 Nexa Systems Inc. # License OPL-1 (Odoo Proprietary License v1.0) from odoo import fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' # NOTE: res.config.settings only supports boolean/integer/float/char/ # selection/many2one/datetime types per project Odoo 19 conventions. fc_repairs_enable_email_notifications = fields.Boolean( string='Enable Repair Email Notifications', config_parameter='fusion_repairs.enable_email_notifications', default=True, help='Master toggle for automated repair-related emails to clients and office.', ) fc_repairs_outstanding_balance_threshold = fields.Float( string='Outstanding Balance Warning ($)', config_parameter='fusion_repairs.outstanding_balance_threshold', default=100.0, help='Show a warning banner during intake if the client has open invoices ' 'totalling more than this amount.', ) fc_repairs_duplicate_call_window_days = fields.Integer( string='Duplicate Call Window (Days)', config_parameter='fusion_repairs.duplicate_call_window_days', default=14, help='When the intake wizard finds an open repair from this many days back on ' 'the same phone number, it offers "add note to existing repair instead".', ) fc_repairs_variance_threshold_pct = fields.Integer( string='Pricing Variance Threshold (%)', config_parameter='fusion_repairs.variance_threshold_pct', default=20, help='If actual cost exceeds estimated cost by more than this percentage, ' 'invoicing is blocked until a manager reviews / a re-quote email is sent.', ) fc_repairs_variance_threshold_amount = fields.Float( string='Pricing Variance Threshold ($)', config_parameter='fusion_repairs.variance_threshold_amount', default=100.0, help='Absolute variance amount that also triggers re-quote (whichever hits first).', ) fc_repairs_client_portal_url = fields.Char( string='Public Client Portal URL Path', config_parameter='fusion_repairs.client_portal_url', default='/repair', help='URL path mentioned in voicemail greetings and printed on QR stickers. ' 'Phase 1 ships with the form at this path.', ) fc_repairs_client_portal_rate_limit_per_hour = fields.Integer( string='Client Portal Rate Limit (per hour, per IP)', config_parameter='fusion_repairs.client_portal_rate_limit_per_hour', default=10, )