[tryton-debian-vcs] tryton-modules-calendar-todo branch upstream-2.6 updated. upstream/2.6.1-1-gca4604a

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Dec 11 18:48:18 UTC 2013


The following commit has been merged in the upstream-2.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-calendar-todo.git;a=commitdiff;h=upstream/2.6.1-1-gca4604a

commit ca4604aedd2fd10552ab8e820e20fbe9ed7a4ab0
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Dec 11 19:23:42 2013 +0100

    Adding upstream version 2.6.2.

diff --git a/CHANGELOG b/CHANGELOG
index 1766455..990f309 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.2 - 2013-12-04
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.1 - 2012-12-23
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 8ad4b79..39f9196 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2009-2012 Cédric Krier.
+Copyright (C) 2009-2013 Cédric Krier.
 Copyright (C) 2009-2012 Bertrand Chenal.
-Copyright (C) 2009-2012 B2CK SPRL.
+Copyright (C) 2009-2013 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index d03b3f6..0e9c718 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_calendar_todo
-Version: 2.6.1
+Version: 2.6.2
 Summary: Tryton module to add TODO on CalDAV
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/todo.py b/todo.py
index dd97700..a3c82ea 100644
--- a/todo.py
+++ b/todo.py
@@ -482,7 +482,7 @@ class Todo(ModelSQL, ModelView):
         if hasattr(vtodo, 'percent_complete'):
             res['percent_complete'] = int(vtodo.percent_complete.value)
         else:
-            res['percent_complete'] = None
+            res['percent_complete'] = 0
 
         if hasattr(vtodo, 'completed'):
             if not isinstance(vtodo.completed.value, datetime.datetime):
@@ -784,7 +784,7 @@ class Todo(ModelSQL, ModelView):
             vtodo.add('class')
             getattr(vtodo, 'class').value = self.classification.upper()
         elif getattr(vtodo, 'class').value.lower() in \
-                dict(self.classification.selection):
+                dict(self.__class__.classification.selection):
             getattr(vtodo, 'class').value = self.classification.upper()
         if self.location:
             if not hasattr(vtodo, 'location'):
diff --git a/tryton.cfg b/tryton.cfg
index b904159..32e1588 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.1
+version=2.6.2
 depends:
     calendar
     ir
diff --git a/trytond_calendar_todo.egg-info/PKG-INFO b/trytond_calendar_todo.egg-info/PKG-INFO
index 3cdcac3..7f3b008 100644
--- a/trytond_calendar_todo.egg-info/PKG-INFO
+++ b/trytond_calendar_todo.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-calendar-todo
-Version: 2.6.1
+Version: 2.6.2
 Summary: Tryton module to add TODO on CalDAV
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/webdav.py b/webdav.py
index ed44d88..1c6f9ad 100644
--- a/webdav.py
+++ b/webdav.py
@@ -29,13 +29,13 @@ class Collection:
                 calendar_id = cls.calendar(uri)
                 if not calendar_id:
                     return None
-            todo_ids = Todo.search([
+            todos = Todo.search([
                 ('calendar', '=', calendar_id),
                 ('uuid', '=', todo_uri[:-4]),
                 ('parent', '=', None),
                 ], limit=1)
-            if todo_ids:
-                return todo_ids[0]
+            if todos:
+                return todos[0].id
 
     @classmethod
     def _caldav_filter_domain_todo(cls, filter):
@@ -177,7 +177,7 @@ class Collection:
                     red_sql, red_ids = reduce_ids('id', sub_ids)
                     cursor.execute('SELECT id, ' \
                             'EXTRACT(epoch FROM create_date) ' \
-                        'FROM "' + Todo.__table__ + '" ' \
+                        'FROM "' + Todo._table + '" ' \
                         'WHERE ' + red_sql, red_ids)
                     for todo_id2, date in cursor.fetchall():
                         if todo_id2 == todo_id:
@@ -223,7 +223,7 @@ class Collection:
                     cursor.execute('SELECT COALESCE(parent, id), ' \
                                 'MAX(EXTRACT(epoch FROM ' \
                                 'COALESCE(write_date, create_date))) ' \
-                            'FROM "' + Todo.__table__ + '" ' \
+                            'FROM "' + Todo._table + '" ' \
                             'WHERE ' + red_id_sql + ' ' \
                                 'OR ' + red_parent_sql + ' ' \
                             'GROUP BY parent, id', red_id_ids + red_parent_ids)
-- 
tryton-modules-calendar-todo



More information about the tryton-debian-vcs mailing list