[FIX] lunch alert for every week is repaired

bzr revid: api@openerp.com-20121226105540-hl97n1o61id0j3sr
This commit is contained in:
Arnaud Pineux
2012-12-26 11:55:40 +01:00
parent ac6e807211
commit 47b4ed737f
+2 -3
View File
@@ -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):
"""