Make leveling_delay and back_leveling_delay required

Make leveling_delay and back_leveling_delay required as they are needed to
compute early_start and late_finish values.

issue3195
review838002
This commit is contained in:
Albert Cervera i Areny committed 2013-04-30 23:46:18 +02:00
1 parent 649d0fffd1
commit 63f2433705
1 file changed
+10 -2
+10 -2
View File
@@ -34,8 +34,8 @@ class Work:
('id', '!=', Eval('id')),
],
depends=['parent', 'id'])
leveling_delay = fields.Float("Leveling Delay")
back_leveling_delay = fields.Float("Back Leveling Delay")
leveling_delay = fields.Float("Leveling Delay", required=True)
back_leveling_delay = fields.Float("Back Leveling Delay", required=True)
allocations = fields.One2Many('project.allocation', 'work', 'Allocations',
states={
'invisible': Eval('type') != 'task',
@@ -83,6 +83,14 @@ class Work:
def check_recursion(cls, records, parent='successors'):
return super(Work, cls).check_recursion(records, parent=parent)
@staticmethod
def default_leveling_delay():
return 0.0
@staticmethod
def default_back_leveling_delay():
return 0.0
@classmethod
def get_function_fields(cls, works, names):
'''