Commit a1496538 authored by Rafael Monnerat's avatar Rafael Monnerat

Added new parameter to round scripts. This is usefull to round that values in...

Added new parameter to round scripts. This is usefull to round that values in a different way for begin and the end of the block.
See: http://www.erp5.org/Discussion/DateRange

Is required to update erp5_core revision to 792 (r20504) or more. 


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20505 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent df3d0fbe
......@@ -292,10 +292,11 @@ class PlanningBoxValidator(Validator.StringBaseValidator):
(start_value, stop_value) = \
self.getActivityBounds(activity_object, activity_block_moved_list,
activity_block_list)
# call specific external method to round value
if round_script is not None:
start_value = round_script(start_value)
stop_value = round_script(stop_value)
start_value = round_script(start_value, axis='begin')
stop_value = round_script(stop_value, axis='end')
# adding object name to list of objects to update
if activity_object.object.getUrl() not in update_list:
update_list.append(activity_object.object.getUrl())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment