From 6a22e52d4aa3265645f810e6f2a20abca766fc2d Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Tue, 20 Sep 2022 12:50:53 +0530 Subject: [PATCH] [UPDT] Sep 20 : Bug fix 'theme_boec' --- theme_boec/__manifest__.py | 2 +- theme_boec/static/src/js/deal_week.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/theme_boec/__manifest__.py b/theme_boec/__manifest__.py index aabcb9a0d..90bed8072 100644 --- a/theme_boec/__manifest__.py +++ b/theme_boec/__manifest__.py @@ -25,7 +25,7 @@ 'summary': 'Theme Boec is a new kind of Theme. ' 'The theme is a very user-friendly and is suitable for your eCommerce website with blog.', 'category': 'Theme/eCommerce', - 'version': '15.0.1.0.0', + 'version': '15.0.1.0.1', 'author': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions', diff --git a/theme_boec/static/src/js/deal_week.js b/theme_boec/static/src/js/deal_week.js index 4ae503fed..82b0b7d23 100644 --- a/theme_boec/static/src/js/deal_week.js +++ b/theme_boec/static/src/js/deal_week.js @@ -22,14 +22,17 @@ odoo.define('theme_boec.deal_week',function(require){ setInterval(function () { var current_date = new Date().getTime(); var seconds_left = (end_date - current_date) / 1000; + var countdown_div = $("#countdown")[0]; days = parseInt(seconds_left / 86400); seconds_left = seconds_left % 86400; hours = parseInt(seconds_left / 3600); seconds_left = seconds_left % 3600; minutes = parseInt(seconds_left / 60); seconds = parseInt(seconds_left % 60); - countdown.innerHTML = '' + days + ' ' + hours + ' ' - + minutes + ' ' + seconds + ' '; + if(countdown_div){ + countdown.innerHTML = '' + days + ' ' + hours + ' ' + + minutes + ' ' + seconds + ' '; + } }, 1000); } })