Commit 406a0181 authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_accounting: Fixup in Aged Balance Report to avoid query with empty list

that would return the whole catalog
parent dc4ebb58
Pipeline #12527 failed with stage
in 0 seconds
...@@ -115,13 +115,14 @@ for brain in portal.portal_simulation.getMovementHistoryList( ...@@ -115,13 +115,14 @@ for brain in portal.portal_simulation.getMovementHistoryList(
if line_dict is not None: if line_dict is not None:
by_mirror_section_list_dict[brain.mirror_section_uid].append(line_dict) by_mirror_section_list_dict[brain.mirror_section_uid].append(line_dict)
line_list.append(line_dict) line_list.append(line_dict)
for row in portal_catalog( if by_mirror_section_list_dict:
select_list=['title'], for row in portal_catalog(
uid=by_mirror_section_list_dict.keys(), select_list=['title'],
): uid=by_mirror_section_list_dict.keys(),
title = row.title ):
for line in by_mirror_section_list_dict[row.uid]: title = row.title
line['mirror_section_title'] = title for line in by_mirror_section_list_dict[row.uid]:
line['mirror_section_title'] = title
return [ return [
Object( Object(
uid='new_', uid='new_',
......
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