[tryton-debian-vcs] tryton-modules-project-plan branch upstream-2.2 created. e052a8a9ddbbe9826fa1118664c8168be5ba6e8d

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:07:04 UTC 2013


The following commit has been merged in the upstream-2.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-project-plan.git;a=commitdiff;h=e052a8a9ddbbe9826fa1118664c8168be5ba6e8d
commit e052a8a9ddbbe9826fa1118664c8168be5ba6e8d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Feb 24 19:39:49 2013 +0100

    Adding upstream version 2.2.1.

diff --git a/CHANGELOG b/CHANGELOG
index 0db227b..4255d8b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.1 - 2012-11-05
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.0 - 2011-10-25
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 8d81a8f..259dafe 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
 Copyright (C) 2009-2011 Bertrand Chenal.
-Copyright (C) 2009-2011 Cédric Krier.
-Copyright (C) 2009-2011 B2CK SPRL.
+Copyright (C) 2009-2012 Cédric Krier.
+Copyright (C) 2009-2012 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 e2c1551..3f2945e 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond_project_plan
-Version: 2.2.0
+Version: 2.2.1
 Summary: Add planning capabilities on projects.
 
 Home-page: http://www.tryton.org/
diff --git a/__tryton__.py b/__tryton__.py
index 41e4a8a..48a96e6 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -7,7 +7,7 @@
     'name_es_CO': 'Planeación de Proyectos',
     'name_es_ES': 'Planificación de proyecto',
     'name_fr_FR': 'Planification de projet',
-    'version': '2.2.0',
+    'version': '2.2.1',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/trytond_project_plan.egg-info/PKG-INFO b/trytond_project_plan.egg-info/PKG-INFO
index bc9a528..9c206d2 100644
--- a/trytond_project_plan.egg-info/PKG-INFO
+++ b/trytond_project_plan.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond-project-plan
-Version: 2.2.0
+Version: 2.2.1
 Summary: Add planning capabilities on projects.
 
 Home-page: http://www.tryton.org/
diff --git a/work.py b/work.py
index ea436f0..bea6b87 100644
--- a/work.py
+++ b/work.py
@@ -121,6 +121,7 @@ class Work(ModelSQL, ModelView):
             all_ids = list(set(all_ids))
 
             works = self.browse(all_ids)
+            all_works = set(works)
 
             durations = {}
             id2work = {}
@@ -139,15 +140,20 @@ class Work(ModelSQL, ModelView):
                 durations[work.id] = work.effort / (total_allocation / 100.0)
 
             while leafs:
-                parents = set()
                 for work_id in leafs:
                     work = id2work[work_id]
+                    all_works.remove(work)
                     if not work.active:
                         continue
                     if work.parent and work.parent.id in durations:
                         durations[work.parent.id] += durations[work_id]
-                        parents.add(work.parent.id)
-                leafs = parents
+                next_leafs = set(w.id for w in all_works)
+                for work in all_works:
+                    if not work.parent:
+                        continue
+                    if work.parent.id in next_leafs and work.parent in works:
+                        next_leafs.remove(work.parent.id)
+                leafs = next_leafs
             res['duration'] = durations
 
 
-- 
tryton-modules-project-plan



More information about the tryton-debian-vcs mailing list