Commit 96347a03 by Xiaowu Zhang

erp5_ods_style: fix the way to get form id

if i have a url like:
https://erp5xxx/form_idxxx?relative_item_relative_url=item_module/7817

with the old way, form id will be 7817

/reviewed-on !824
1 parent e180de30
......@@ -16,7 +16,7 @@ def getReportSectionListForObject(doc):
title = title,
form_id = None))
for action in portal.portal_actions.listFilteredActionsFor(doc)['object_view']:
form_id = action['url'].split('/')[-1].split('?')[0]
form_id = action['url'].split('?')[0].split('/')[-1]
action_title = action['title']
if action_title != 'History' and action_title != 'Metadata':
report_section_list.append(ReportSection(path = doc.getPath(),
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!