From b6684e34ad0d5dfd34d8e198c6f8393ddfe1fa44 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Sat, 13 Jun 2026 18:43:34 +0700 Subject: [PATCH] feat: add logger to record generated OTP verification codes --- models/loyalty_verification_otp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/models/loyalty_verification_otp.py b/models/loyalty_verification_otp.py index 7f4652a..5191bf4 100644 --- a/models/loyalty_verification_otp.py +++ b/models/loyalty_verification_otp.py @@ -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"