From ec4d3f0a3233b64931b39a0cd9f27d536888010c Mon Sep 17 00:00:00 2001
From: Mylyna Hy
Date: Wed, 24 Jan 2024 10:27:36 -0800
Subject: [PATCH] [FIX] loyalty: conditionally display expiration date
Problem: The test value for the expiration date was being shown on gift card reports that don't have expiration dates.
Purpose: The expiration date should only be shown if it's set for the gift card code.
It will be consistent with loyalty_report and the email template mail_template_gift_card in which both conditionally displays the expiration date.
Steps to Reproduce on Runbot:
1. Install Sales
2. Settings > Sales > Enable Discounts & loyalty programs
3. Navigate to Sales > Gift cards and create/generate a gift card code with no expiration date
4. Print the gift card report and the report will show the expiration date of 2023-12-31
opw-3686110
closes odoo/odoo#150954
Signed-off-by: Mylyna Hy (myhy)
---
addons/loyalty/report/loyalty_report_templates.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/loyalty/report/loyalty_report_templates.xml b/addons/loyalty/report/loyalty_report_templates.xml
index 557d92fc52d..93976a76be0 100644
--- a/addons/loyalty/report/loyalty_report_templates.xml
+++ b/addons/loyalty/report/loyalty_report_templates.xml
@@ -106,7 +106,7 @@
-
+
Card expires 2023-12-31