From 72287d2eac828b719f6ae3c8fbb2d5db090969b2 Mon Sep 17 00:00:00 2001 From: Arnaud Pineux Date: Thu, 4 Oct 2012 18:03:51 +0200 Subject: [PATCH] [MERGE]Lunch_new application bzr revid: api@openerp.com-20121004160351-wjllis392qemjb96 --- addons/lunch_new/lunch.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/lunch_new/lunch.py b/addons/lunch_new/lunch.py index d42e17eea36..398260ae554 100644 --- a/addons/lunch_new/lunch.py +++ b/addons/lunch_new/lunch.py @@ -76,11 +76,15 @@ class lunch_order(osv.Model): elif alert.active_from=alert.active_from and now<=alert.active_to: + hour_to = int(alert.active_to) + min_to = int((alert.active_to-hour_to)*60) + to_alert = ""+str(hour_to)+":"+str(min_to) + hour_from = int(alert.active_from) + min_from = int((alert.active_from-hour_from)*60) + from_alert = ""+str(hour_from)+":"+str(min_from) + if now>=from_alert and now<=to_alert: alert_msg+=" * " alert_msg+=alert.message alert_msg+='\n'