Commit 96347a03 authored by Xiaowu Zhang's avatar 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 nexedi/erp5!824
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(),
......
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