Commit bf0163e2 authored by Jérome Perrin's avatar Jérome Perrin

Add no_mirror_section_uid_cache parameter in ERP5Accounting_getParams, to...

Add no_mirror_section_uid_cache parameter in ERP5Accounting_getParams, to prevent caching mirror_section_uid and payment_uid.
Use no_mirror_section_uid_cache in GL



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13861 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 24dfc507
......@@ -88,13 +88,12 @@ omit_grouping_reference = request.get(\'omit_grouping_reference\', False)\n
\n
request.other[\'is_accounting_report\'] = True\n
\n
params = { \'at_date\' : at_date\n
, \'section_category\' : section_category\n
, \'simulation_state\' : simulation_state\n
, \'accounting_transaction_line_currency\': None\n
, \'omit_grouping_reference\' : omit_grouping_reference\n
, \'from_date_summary\' : True\n
}\n
params = dict(at_date=at_date,\n
section_category=section_category,\n
simulation_state=simulation_state,\n
omit_grouping_reference=omit_grouping_reference,\n
from_date_summary=True,\n
no_mirror_section_uid_cache=1)\n
\n
if from_date:\n
params[\'from_date\'] = from_date\n
......@@ -302,6 +301,7 @@ return result\n
<string>display_categories</string>
<string>omit_grouping_reference</string>
<string>_write_</string>
<string>dict</string>
<string>params</string>
<string>result</string>
<string>account_columns</string>
......
......@@ -132,13 +132,17 @@ precision = selection_params.get(\'precision\', None)\n
if precision is not None:\n
params[\'precision\'] = precision\n
\n
mirror_section_uid = selection_params.get(\'mirror_section_uid\', None)\n
if mirror_section_uid:\n
params[\'mirror_section_uid\'] = mirror_section_uid\n
# Some reports, such as general ledger, uses different forms with different report\n
# parameters, we don\'t want to accidentally fill the cache with mirror_section_uid \n
# or payment_uid.\n
if not selection_params.get(\'no_mirror_section_uid_cache\', 0):\n
mirror_section_uid = selection_params.get(\'mirror_section_uid\', None)\n
if mirror_section_uid:\n
params[\'mirror_section_uid\'] = mirror_section_uid\n
\n
payment_uid = selection_params.get(\'payment_uid\', None)\n
if payment_uid:\n
params[\'payment_uid\'] = payment_uid\n
payment_uid = selection_params.get(\'payment_uid\', None)\n
if payment_uid:\n
params[\'payment_uid\'] = payment_uid\n
\n
simulation_state = selection_params.get(\'simulation_state\',\n
preference.getPreferredAccountingTransactionSimulationStateList())\n
......
237
\ No newline at end of file
238
\ No newline at end of file
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