Commit 3b943572 authored by Jérome Perrin's avatar Jérome Perrin

calendar: python3 support

parent bf5790b4
...@@ -39,7 +39,7 @@ for person in person_value_list: ...@@ -39,7 +39,7 @@ for person in person_value_list:
portal_type='Leave Request Period', portal_type='Leave Request Period',
group_by_resource=1): group_by_resource=1):
resource = inventory.resource_relative_url resource = inventory.resource_relative_url or ''
if inventory.resource_uid in presence_resource_uid_list: if inventory.resource_uid in presence_resource_uid_list:
raise ValueError("This report does not work when same resource are" raise ValueError("This report does not work when same resource are"
......
...@@ -3,7 +3,7 @@ column_item_list = [ ('person_career_reference', 'Employee Number'), ...@@ -3,7 +3,7 @@ column_item_list = [ ('person_career_reference', 'Employee Number'),
non_translatable_column_item_list = context\ non_translatable_column_item_list = context\
.PersonModule_getLeaveRequestReportListboxUntranslatableColumnList() .PersonModule_getLeaveRequestReportListboxUntranslatableColumnList()
non_translatable_column_item_list.sort(lambda a,b: cmp(a[1], b[1])) non_translatable_column_item_list.sort(key=lambda v: v[1])
column_item_list.extend(non_translatable_column_item_list) column_item_list.extend(non_translatable_column_item_list)
column_item_list.append(('total', 'Total')) column_item_list.append(('total', 'Total'))
......
...@@ -15,6 +15,6 @@ for inventory in stool.getInventoryList( ...@@ -15,6 +15,6 @@ for inventory in stool.getInventoryList(
resource_list.append( resource_list.append(
(inventory.resource_relative_url, (inventory.resource_relative_url,
portal.portal_categories.restrictedTraverse( portal.portal_categories.restrictedTraverse(
inventory.resource_relative_url).getTitle())) inventory.resource_relative_url).getTranslatedTitle()))
return resource_list return resource_list
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