Ajout de styles sur les titres
[oeodf/todolist_ods_builder.git] / odsgen
diff --git a/odsgen b/odsgen
index 5fe52bd..dc88f19 100644 (file)
--- a/odsgen
+++ b/odsgen
@@ -3,9 +3,8 @@
 
 #odf : 608
 import openerplib
-from oe import *
-from ods import *
-#from getpass import getpass
+from oe import get_containers, get_tasks
+from ods import create_doc
 
 
 def get_user_name(connection, user_login):
@@ -18,16 +17,11 @@ def get_user_name(connection, user_login):
 
 
 if __name__ == '__main__':
-#    login = raw_input('Utilisateur: ')
-#    password = getpass('Mot de passe: ')
-
     connection = openerplib.get_connection(
         hostname='localhost',
         database='testing',
-#        login = login,
-#        password = password
-        login = "admin",
-        password = "admin",
+        login="admin",
+        password="admin",
     )
 
     try:
@@ -35,14 +29,17 @@ if __name__ == '__main__':
     except:
         print('Serveur éteint ou Identifiants incorrects')
     else:
-        print('Test sur res.user : %s' % (get_user_name(connection, 'admin') == 'Administrator'))
+        print('Test sur res.user : %s' %
+              (get_user_name(connection, 'admin') == 'Administrator'))
         containers = get_containers(connection)
-        tasks = {c["id"]: get_tasks(connection, c["tasks"]) for c in containers}
+        tasks = {c["id"]: get_tasks(connection,
+                                    c["tasks"]) for c in containers}
 
-        #============================================================================
+        #======================================================================
         # _tasks = []
         # for c in containers:
         #    _tasks[c["id"]] = get_tasks(connection, c["tasks"])
-        #============================================================================
+        #======================================================================
 
-        create_doc(containers, tasks)
\ No newline at end of file
+        create_doc(containers, tasks)
+        #SplitAllSheets("Mes_todolist.ods")