From 44513a73b598d604731d8471b7193a513a6a7f57 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 23 Dec 2014 11:54:35 +0100 Subject: [PATCH] [IMP] resource: remove the need to install matplotlib Seriously? To flatten a list, a math dependency of 80MB? Fixes #4383 --- addons/resource/faces/timescale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/resource/faces/timescale.py b/addons/resource/faces/timescale.py index 818c031b7d5..e7e67a42437 100644 --- a/addons/resource/faces/timescale.py +++ b/addons/resource/faces/timescale.py @@ -21,7 +21,7 @@ ############################################################################ import faces.pcalendar as pcal -import matplotlib.cbook as cbook +import openerp.tools as tools import datetime import sys @@ -73,7 +73,7 @@ class TimeScale(object): def create_time_slots(day): src_slots = dcal.get_working_times(day) slots = [0, src_slots, 24*60] - slots = tuple(cbook.flatten(slots)) + slots = tuple(tools.flatten(slots)) slots = zip(slots[:-1], slots[1:]) #balance non working slots