diff --git a/addons/lunch/models/lunch_supplier.py b/addons/lunch/models/lunch_supplier.py index 57e2660ef18..7eabec19d5c 100644 --- a/addons/lunch/models/lunch_supplier.py +++ b/addons/lunch/models/lunch_supplier.py @@ -16,17 +16,14 @@ from odoo.addons.base.models.res_partner import _tz_get WEEKDAY_TO_NAME = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] CRON_DEPENDS = {'name', 'active', 'send_by', 'automatic_email_time', 'moment', 'tz'} -def float_to_time(hours, moment='am', tz=None): +def float_to_time(hours, moment='am'): """ Convert a number of hours into a time object. """ if hours == 12.0 and moment == 'pm': return time.max fractional, integral = math.modf(hours) if moment == 'pm': integral += 12 - res = time(int(integral), int(float_round(60 * fractional, precision_digits=0)), 0) - if tz: - res = res.replace(tzinfo=pytz.timezone(tz)) - return res + return time(int(integral), int(float_round(60 * fractional, precision_digits=0)), 0) def time_to_float(t): return float_round(t.hour + t.minute/60 + t.second/3600, precision_digits=2)