From 47b4ed737f9bc29398867d729bcc7a7a5122709e Mon Sep 17 00:00:00 2001 From: Arnaud Pineux Date: Wed, 26 Dec 2012 11:55:40 +0100 Subject: [PATCH] [FIX] lunch alert for every week is repaired bzr revid: api@openerp.com-20121226105540-hl97n1o61id0j3sr --- addons/lunch/lunch.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/lunch/lunch.py b/addons/lunch/lunch.py index 0a693f50a3f..f61ecc8eb7d 100644 --- a/addons/lunch/lunch.py +++ b/addons/lunch/lunch.py @@ -94,9 +94,8 @@ class lunch_order(osv.Model): """ today = datetime.now().isoweekday() assert 1 <= today <= 7, "Should be between 1 and 7" - mapping = dict((idx, name) for idx, name in enumerate('monday tuestday wednesday thursday friday saturday sunday'.split())) - if today in mapping: - return mapping[today] + mapping = dict((idx, name) for idx, name in enumerate('days monday tuesday wednesday thursday friday saturday sunday'.split())) + return alert[mapping[today]] def can_display_alert(self, alert): """