Commit 4ce8f370 authored by Vincent Pelletier's avatar Vincent Pelletier

AccountingTransactionModule_getAccountingTransactionList: Workaround poor...

AccountingTransactionModule_getAccountingTransactionList: Workaround poor column mapping for reference filtering.
parent 392161f2
...@@ -92,15 +92,18 @@ if creation_date_range_min or creation_date_range_max: ...@@ -92,15 +92,18 @@ if creation_date_range_min or creation_date_range_max:
range='max') range='max')
select_dict = params.get('select_dict') or {} select_dict = params.get('select_dict') or {}
select_dict.update(dict(total_debit=None, select_dict['total_debit'] = None
total_credit=None, select_dict['total_credit'] = None
reference=None, # XXX: force mapping of reference column to catalog, to take advantage of (portl_type, reference) index.
specific_reference=None, # Without this, ColumnMapper would choose to use accounting_transaction.reference, because a lot of
project_uid=None, # columns from that table are used. But it does not realise there is no portal_type column *and*
payment_uid=None, # a (portl_type, reference) index exists on catalog.
mirror_section_uid=None, select_dict['catalog.reference'] = None
operation_date=None)) select_dict['specific_reference'] = None
select_dict['project_uid'] = None
select_dict['payment_uid'] = None
select_dict['mirror_section_uid'] = None
select_dict['operation_date'] = None
params['select_dict'] = select_dict params['select_dict'] = select_dict
# We group by uid to really filter duplicated lines, but this makes generated # We group by uid to really filter duplicated lines, but this makes generated
......
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