updates
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import logging
|
||||
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -476,6 +477,16 @@ class ResConfigSettings(models.TransientModel):
|
||||
help='Default ODSP office contact for new ODSP cases',
|
||||
)
|
||||
|
||||
# =========================================================================
|
||||
# PORTAL FORMS
|
||||
# =========================================================================
|
||||
|
||||
fc_ltc_form_password = fields.Char(
|
||||
string='LTC Form Access Password',
|
||||
config_parameter='fusion_claims.ltc_form_password',
|
||||
help='Minimum 4 characters. Share with facility staff to access the repair form.',
|
||||
)
|
||||
|
||||
@api.model
|
||||
def get_values(self):
|
||||
res = super().get_values()
|
||||
@@ -571,6 +582,13 @@ class ResConfigSettings(models.TransientModel):
|
||||
# Office notification recipients are stored via related field on res.company
|
||||
# No need to store in ir.config_parameter
|
||||
|
||||
# Validate LTC form password length
|
||||
form_pw = self.fc_ltc_form_password or ''
|
||||
if form_pw and len(form_pw.strip()) < 4:
|
||||
raise ValidationError(
|
||||
'LTC Form Access Password must be at least 4 characters.'
|
||||
)
|
||||
|
||||
# Store designated vendor signer (Many2one - manual handling)
|
||||
if self.fc_designated_vendor_signer:
|
||||
ICP.set_param('fusion_claims.designated_vendor_signer',
|
||||
|
||||
Reference in New Issue
Block a user