feat: add logger to record generated OTP verification codes
This commit is contained in:
parent
aa2694020d
commit
b6684e34ad
@ -1,8 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import random
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from odoo import api, fields, models
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
class LoyaltyVerificationOtp(models.Model):
|
||||
_name = 'loyalty.verification.otp'
|
||||
_description = 'Loyalty Verification OTP'
|
||||
@ -37,6 +40,8 @@ class LoyaltyVerificationOtp(models.Model):
|
||||
'otp_type': otp_type,
|
||||
})
|
||||
|
||||
_logger.info("Generated OTP verification code [%s] for contact %s (Type: %s)", otp_code, email or phone, otp_type)
|
||||
|
||||
# Send Email
|
||||
if email:
|
||||
subject = "Verification Code - Mie Mapan"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user