Commit 5d2906ac authored by Aurel's avatar Aurel Committed by Jérome Perrin

accounting : do the stat with the select parameter otherwise it counts...

accounting : do the stat with the select parameter otherwise it counts distinct which give bad results
parent 797d5dfc
......@@ -143,9 +143,6 @@ if creation_date_range_min or creation_date_range_max:\n
query=(creation_date_range_max, ),\n
range=\'max\')\n
\n
if stat:\n
return context.countFolder(**params)\n
\n
select_dict = params.get(\'select_dict\') or {}\n
select_dict.update(dict(total_debit=None,\n
total_credit=None,\n
......@@ -166,6 +163,8 @@ params[\'select_dict\'] = select_dict\n
if not params.get(\'accounting_transaction.section_uid\'):\n
params.setdefault(\'group_by\', (\'uid\',))\n
\n
if stat:\n
return context.countFolder(**params)\n
return context.searchFolder(**params)\n
</string> </value>
</item>
......
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