Commit 82d62d97 authored by Kevin Deldycke's avatar Kevin Deldycke

Fix Organisation_getEmployeeList to handle non-defined grade on employees.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8329 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 29048442
...@@ -84,14 +84,27 @@ if start_date == None and stop_date == None:\n ...@@ -84,14 +84,27 @@ if start_date == None and stop_date == None:\n
start_date = DateTime(current_year, 1, 1)\n start_date = DateTime(current_year, 1, 1)\n
stop_date = DateTime(current_year + 1, 1, 1) - 1\n stop_date = DateTime(current_year + 1, 1, 1) - 1\n
\n \n
employees = []\n # Get persons\n
person_list = []\n
for subordinate in subordinate_list:\n
sub_obj = subordinate \n
sub_type = subordinate.getPortalType()\n
# The parent of Assignments and Careers objects are Persons\n
if sub_type in (\'Assignment\', \'Career\'):\n
sub_obj = subordinate.getParent()\n
sub_type = sub_obj.getPortalType()\n
# Last check to be sure we only include persons in person_list\n
if sub_type == \'Person\':\n
person_list.append(sub_obj)\n
\n \n
for person in subordinate_list:\n # Filter person list to only get employees\n
if person.getPortalType() == \'Person\' and \\\n employees = []\n
person.getValidationState() == \'validated\' and \\\n for person in person_list:\n
person.getDefaultCareerStopDate() >= stop_date and \\\n if person.getValidationState() == \'validated\' and \\\n
person.getDefaultCareerStartDate() <= start_date and \\\n person.getDefaultCareerStopDate() >= stop_date and \\\n
person.getRole().endswith(\'internal\') and \\\n person.getDefaultCareerStartDate() <= start_date and \\\n
person.getRole().endswith(\'internal\') and \\\n
person.getDefaultCareerGrade() not in (None, \'\') and \\\n
not person.getDefaultCareerGrade().endswith(\'trainee\'):\n not person.getDefaultCareerGrade().endswith(\'trainee\'):\n
# TODO: take car of discontinued career step period\n # TODO: take car of discontinued career step period\n
if person not in employees:\n if person not in employees:\n
...@@ -149,8 +162,12 @@ return employees\n ...@@ -149,8 +162,12 @@ return employees\n
<string>None</string> <string>None</string>
<string>DateTime</string> <string>DateTime</string>
<string>current_year</string> <string>current_year</string>
<string>employees</string> <string>person_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>subordinate</string>
<string>sub_obj</string>
<string>sub_type</string>
<string>employees</string>
<string>person</string> <string>person</string>
</tuple> </tuple>
</value> </value>
......
2006-07-06 Kevin
* Fix Organisation_getEmployeeList to handle non-defined grade on employees.
2006-06-29 jerome 2006-06-29 jerome
* fix matrix box in PaySheetLine_viewQuantity * fix matrix box in PaySheetLine_viewQuantity
......
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