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 ...@@ -28,6 +28,7 @@ context.activate().AccountingTransactionModule_viewFrenchAccountingTransactionFi
user_name=user_name, user_name=user_name,
tag=tag, tag=tag,
aggregate_tag=aggregate_tag, aggregate_tag=aggregate_tag,
date_column=date_column,
search_kw=search_kw) search_kw=search_kw)
return context.Base_redirect(form_id, keep_items=dict( return context.Base_redirect(form_id, keep_items=dict(
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -4,6 +4,9 @@ at_date = at_date.latestTime() ...@@ -4,6 +4,9 @@ at_date = at_date.latestTime()
section_uid_list = portal.Base_getSectionUidListForSectionCategory( section_uid_list = portal.Base_getSectionUidListForSectionCategory(
section_category, section_category_strict) section_category, section_category_strict)
if date_column is None:
date_column = 'operation_date'
if from_date is None: if from_date is None:
from_date = portal.Base_getAccountingPeriodStartDateForSectionCategory( from_date = portal.Base_getAccountingPeriodStartDateForSectionCategory(
section_category, at_date) section_category, at_date)
...@@ -24,7 +27,7 @@ def _groupedJournalTupleDict(): ...@@ -24,7 +27,7 @@ def _groupedJournalTupleDict():
search_kw['simulation_state'] = simulation_state search_kw['simulation_state'] = simulation_state
search_kw['accounting_transaction.section_uid'] = section_uid_list 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 = [] journal_tuple_list = []
if group_by == 'ledger': if group_by == 'ledger':
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>id</string> </key> <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