Commit cc4d6fe1 authored by Arnaud Fontaine's avatar Arnaud Fontaine Committed by Cédric Le Ninivin

erp5_accounting_l10n_fr: Make date column used to export FEC configurable.

Project use case: Use modification_date instead of operation_date to export
ATs modified the day before.
parent 7edb35a0
......@@ -28,6 +28,7 @@ context.activate().AccountingTransactionModule_viewFrenchAccountingTransactionFi
user_name=user_name,
tag=tag,
aggregate_tag=aggregate_tag,
date_column=date_column,
search_kw=search_kw)
return context.Base_redirect(form_id, keep_items=dict(
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>section_category, section_category_strict, at_date, simulation_state, from_date=None, group_by=\'portal_type\', ledger=None, form_id=None, search_kw=None, **kw</string> </value>
<value> <string>section_category, section_category_strict, at_date, simulation_state, from_date=None, group_by=\'portal_type\', ledger=None, form_id=None, date_column=None, search_kw=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -4,6 +4,9 @@ at_date = at_date.latestTime()
section_uid_list = portal.Base_getSectionUidListForSectionCategory(
section_category, section_category_strict)
if date_column is None:
date_column = 'operation_date'
if from_date is None:
from_date = portal.Base_getAccountingPeriodStartDateForSectionCategory(
section_category, at_date)
......@@ -24,7 +27,7 @@ def _groupedJournalTupleDict():
search_kw['simulation_state'] = simulation_state
search_kw['accounting_transaction.section_uid'] = section_uid_list
search_kw['operation_date'] = {'query': (from_date, at_date), 'range': 'minngt' }
search_kw[date_column] = {'query': (from_date, at_date), 'range': 'minngt' }
journal_tuple_list = []
if group_by == 'ledger':
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>section_category, section_category_strict, from_date, at_date, group_by, simulation_state, ledger, user_name, tag, aggregate_tag, search_kw=None, **kw</string> </value>
<value> <string>section_category, section_category_strict, from_date, at_date, group_by, simulation_state, ledger, user_name, tag, aggregate_tag, date_column=None, search_kw=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
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