[tryton-debian-vcs] tryton-modules-project-plan branch debian updated. debian/3.4.1-1-2-g7f25ba6

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:05:23 UTC 2015


The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-project-plan.git;a=commitdiff;h=debian/3.4.1-1-2-g7f25ba6

commit 7f25ba673aab47a7ef8f4b8bcb497342725283a2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Apr 23 17:00:03 2015 +0200

    Merging upstream version 3.6.0.

diff --git a/CHANGELOG b/CHANGELOG
index 5ea92eb..de0c3b1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
-Version 3.4.1 - 2015-02-22
+Version 3.6.0 - 2015-04-20
 * Bug fixes (see mercurial logs for details)
+* Add support for PyPy
+* Use TimeDelta field
 
 Version 3.4.0 - 2014-10-20
 * Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 57e121b..475fa64 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_project_plan
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module to add planning capabilities on projects
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
 Description: trytond_project_plan
         ====================
         
@@ -65,4 +65,6 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/__init__.py b/__init__.py
index 09faa0b..70f9805 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from trytond.pool import Pool
 from .allocation import *
diff --git a/allocation.py b/allocation.py
index 72b51f2..ef61c4f 100644
--- a/allocation.py
+++ b/allocation.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 from trytond import backend
 from trytond.model import ModelView, ModelSQL, fields
 from trytond.pool import Pool
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 118476e..8cc5985 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -112,7 +112,7 @@ msgstr "Restricció de temps d'inici"
 
 msgctxt "field:project.work,duration:"
 msgid "Duration"
-msgstr "Durada"
+msgstr "Temps"
 
 msgctxt "field:project.work,early_finish_date:"
 msgid "Early Finish"
@@ -124,11 +124,11 @@ msgstr "Hora de finalització avançada"
 
 msgctxt "field:project.work,early_start_date:"
 msgid "Early Start"
-msgstr "Inici avançat"
+msgstr "Inici prematur"
 
 msgctxt "field:project.work,early_start_time:"
 msgid "Early Start Time"
-msgstr "Temps d'inici prematur"
+msgstr "Hora d'inici prematur"
 
 msgctxt "field:project.work,late_finish_date:"
 msgid "Late Finish"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 926c7be..59d0b32 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -160,7 +160,7 @@ msgstr "Nachfolger"
 
 msgctxt "model:ir.action,name:wizard_leveling"
 msgid "Tasks Leveling"
-msgstr "Aufgabenabgleich"
+msgstr "Aufgaben abgleichen"
 
 msgctxt "model:project.allocation,name:"
 msgid "Allocation"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 9fc2fed..79b06c1 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -112,7 +112,7 @@ msgstr "Restricción hora de inicio"
 
 msgctxt "field:project.work,duration:"
 msgid "Duration"
-msgstr "Duración"
+msgstr "Tiempo"
 
 msgctxt "field:project.work,early_finish_date:"
 msgid "Early Finish"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index e505fbb..36fc2cc 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -96,19 +96,19 @@ msgstr "Izravnalna zakasnitev nazaj"
 
 msgctxt "field:project.work,constraint_finish_date:"
 msgid "Constraint Finish"
-msgstr "Omejen konec"
+msgstr "Omejen datum zaključka"
 
 msgctxt "field:project.work,constraint_finish_time:"
 msgid "Constraint  Finish Time"
-msgstr "Omejen končni čas"
+msgstr "Omejen čas zaključka"
 
 msgctxt "field:project.work,constraint_start_date:"
 msgid "Constraint Start"
-msgstr "Omejen začetek"
+msgstr "Omejen datum začetka"
 
 msgctxt "field:project.work,constraint_start_time:"
 msgid "Constraint Start Time"
-msgstr "Omejen začetni čas"
+msgstr "Omejen čas začetka"
 
 msgctxt "field:project.work,duration:"
 msgid "Duration"
@@ -116,19 +116,19 @@ msgstr "Trajanje"
 
 msgctxt "field:project.work,early_finish_date:"
 msgid "Early Finish"
-msgstr "Zgodnji konec"
+msgstr "Datum predčasnega konca"
 
 msgctxt "field:project.work,early_finish_time:"
 msgid "Early Finish Time"
-msgstr "Predčasni končni čas"
+msgstr "Čas predčasnega konca"
 
 msgctxt "field:project.work,early_start_date:"
 msgid "Early Start"
-msgstr "Predčasni začetek"
+msgstr "Datum predčasnega začetka"
 
 msgctxt "field:project.work,early_start_time:"
 msgid "Early Start Time"
-msgstr "Predčasni začetni čas"
+msgstr "Čas predčasnega začetka"
 
 msgctxt "field:project.work,late_finish_date:"
 msgid "Late Finish"
diff --git a/setup.py b/setup.py
index cbfe25f..d5c3c76 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from setuptools import setup
 import re
@@ -86,6 +86,8 @@ setup(name=name,
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: Implementation :: CPython',
+        'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Office/Business',
         ],
     license='GPL-3',
diff --git a/tests/__init__.py b/tests/__init__.py
index 6ba206d..9d49738 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from .test_project_plan import suite
 
diff --git a/tests/test_project_plan.py b/tests/test_project_plan.py
index c740c86..b676194 100644
--- a/tests/test_project_plan.py
+++ b/tests/test_project_plan.py
@@ -1,23 +1,13 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 import unittest
 import trytond.tests.test_tryton
-from trytond.tests.test_tryton import test_view, test_depends
+from trytond.tests.test_tryton import ModuleTestCase
 
 
-class ProjectPlanTestCase(unittest.TestCase):
+class ProjectPlanTestCase(ModuleTestCase):
     'Test ProjectPlan module'
-
-    def setUp(self):
-        trytond.tests.test_tryton.install_module('project_plan')
-
-    def test0005views(self):
-        'Test views'
-        test_view('project_plan')
-
-    def test0006depends(self):
-        'Test depends'
-        test_depends()
+    module = 'project_plan'
 
 
 def suite():
diff --git a/tryton.cfg b/tryton.cfg
index 424e329..b373e9d 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.6.0
 depends:
     ir
     company
diff --git a/trytond_project_plan.egg-info/PKG-INFO b/trytond_project_plan.egg-info/PKG-INFO
index 9cca1d5..185d3f0 100644
--- a/trytond_project_plan.egg-info/PKG-INFO
+++ b/trytond_project_plan.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-project-plan
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module to add planning capabilities on projects
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
 Description: trytond_project_plan
         ====================
         
@@ -65,4 +65,6 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/trytond_project_plan.egg-info/requires.txt b/trytond_project_plan.egg-info/requires.txt
index 95e0444..4684d71 100644
--- a/trytond_project_plan.egg-info/requires.txt
+++ b/trytond_project_plan.egg-info/requires.txt
@@ -1,4 +1,4 @@
-trytond_company >= 3.4, < 3.5
-trytond_project >= 3.4, < 3.5
-trytond_timesheet >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+trytond_company >= 3.6, < 3.7
+trytond_project >= 3.6, < 3.7
+trytond_timesheet >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
\ No newline at end of file
diff --git a/view/work_form.xml b/view/work_form.xml
index 8229a96..7c1f07c 100644
--- a/view/work_form.xml
+++ b/view/work_form.xml
@@ -21,13 +21,12 @@ this repository contains the full copyright notices and license terms. -->
             <label name="actual_finish_date"/>
             <field name="actual_finish_date"/>
             <label name="duration"/>
-            <field name="duration" widget="float_time" float_time="company_work_time"/>
+            <field name="duration"/>
             <newline/>
             <field name="predecessors" colspan="2"/>
             <field name="successors" colspan="2"/>
         </page>
-        <page string="Allocations" id="allocations"
-            states="{'invisible': Not(Equal(Eval('type'), 'task'))}" >
+        <page string="Allocations" name="allocations">
             <field name="allocations" colspan="4"/>
         </page>
     </xpath>
diff --git a/work.py b/work.py
index f7a065d..7656ecc 100644
--- a/work.py
+++ b/work.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 import datetime
 from collections import deque, defaultdict
 from heapq import heappop, heappush
@@ -40,7 +40,9 @@ class Work:
         states={
             'invisible': Eval('type') != 'task',
             }, depends=['type'])
-    duration = fields.Function(fields.Float('Duration'), 'get_function_fields')
+    duration = fields.Function(
+        fields.TimeDelta('Duration', 'company_work_time'),
+        'get_function_fields')
     early_start_time = fields.DateTime("Early Start Time", readonly=True)
     late_start_time = fields.DateTime("Late Start Time", readonly=True)
     early_finish_time = fields.DateTime("Early Finish Time", readonly=True)
@@ -108,12 +110,13 @@ class Work:
                     leafs.add(work.id)
 
                 total_allocation = 0
-                if not work.allocations:
-                    durations[work.id] = (work.effort or 0)
+                if not work.allocations or not work.effort_duration:
+                    durations[work.id] = work.effort_duration
                     continue
                 for allocation in work.allocations:
                     total_allocation += allocation.percentage
-                durations[work.id] = ((work.effort or 0)
+                durations[work.id] = datetime.timedelta(
+                    seconds=work.effort_duration.total_seconds()
                     / (total_allocation / 100.0))
 
             while leafs:
@@ -168,6 +171,12 @@ class Work:
                         })
                 break
 
+    @property
+    def hours(self):
+        if not self.duration:
+            return 0
+        return self.duration.total_seconds() / 60 / 60
+
     @classmethod
     def add_minutes(cls, company, date, minutes):
         minutes = int(round(minutes))
@@ -290,7 +299,7 @@ class Work:
                     if values[work]['early_start_time']:
                         early_finish_time = self.add_hours(work.company,
                                 values[work]['early_start_time'],
-                                work.duration)
+                                work.hours)
                 values[work]['early_finish_time'] = early_finish_time
 
                 # Propagate constraint_start on successors
@@ -310,7 +319,7 @@ class Work:
 
                 # if no sibling continue to walk up the tree
                 if not work2children.get(work.parent):
-                    if not work.parent in values:
+                    if work.parent not in values:
                         values[work.parent] = {}
                     parent = work.parent
 
@@ -328,7 +337,7 @@ class Work:
                 early_start = None
 
             # update values
-            if not work in values:
+            if work not in values:
                 values[work] = {}
             values[work]['early_start_time'] = early_start
 
@@ -370,7 +379,7 @@ class Work:
                     if values[work]['late_finish_time']:
                         late_start_time = self.add_hours(work.company,
                                 values[work]['late_finish_time'],
-                                -work.duration)
+                                -work.hours)
                 values[work]['late_start_time'] = late_start_time
 
                 # Propagate constraint_finish on predecessors
@@ -390,7 +399,7 @@ class Work:
 
                 # if no sibling continue to walk up the tree
                 if not work2children.get(work.parent):
-                    if not work.parent in values:
+                    if work.parent not in values:
                         values[work.parent] = {}
                     parent = work.parent
 
@@ -408,7 +417,7 @@ class Work:
                 late_finish = None
 
             # update values
-            if not work in values:
+            if work not in values:
                 values[work] = {}
             values[work]['late_finish_time'] = late_finish
 
@@ -499,7 +508,7 @@ class Work:
                     elif item[1] >= delay + sibling.duration:
                         overloaded.append(item)
                     else:
-                        #Succes!
+                        # Succes!
                         break
 
                 heappush(timeline,
-- 
tryton-modules-project-plan



More information about the tryton-debian-vcs mailing list