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 ...@@ -88,13 +88,12 @@ omit_grouping_reference = request.get(\'omit_grouping_reference\', False)\n
\n \n
request.other[\'is_accounting_report\'] = True\n request.other[\'is_accounting_report\'] = True\n
\n \n
params = { \'at_date\' : at_date\n params = dict(at_date=at_date,\n
, \'section_category\' : section_category\n section_category=section_category,\n
, \'simulation_state\' : simulation_state\n simulation_state=simulation_state,\n
, \'accounting_transaction_line_currency\': None\n omit_grouping_reference=omit_grouping_reference,\n
, \'omit_grouping_reference\' : omit_grouping_reference\n from_date_summary=True,\n
, \'from_date_summary\' : True\n no_mirror_section_uid_cache=1)\n
}\n
\n \n
if from_date:\n if from_date:\n
params[\'from_date\'] = from_date\n params[\'from_date\'] = from_date\n
...@@ -302,6 +301,7 @@ return result\n ...@@ -302,6 +301,7 @@ return result\n
<string>display_categories</string> <string>display_categories</string>
<string>omit_grouping_reference</string> <string>omit_grouping_reference</string>
<string>_write_</string> <string>_write_</string>
<string>dict</string>
<string>params</string> <string>params</string>
<string>result</string> <string>result</string>
<string>account_columns</string> <string>account_columns</string>
......
...@@ -132,12 +132,16 @@ precision = selection_params.get(\'precision\', None)\n ...@@ -132,12 +132,16 @@ precision = selection_params.get(\'precision\', None)\n
if precision is not None:\n if precision is not None:\n
params[\'precision\'] = precision\n params[\'precision\'] = precision\n
\n \n
mirror_section_uid = selection_params.get(\'mirror_section_uid\', None)\n # Some reports, such as general ledger, uses different forms with different report\n
if mirror_section_uid:\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 params[\'mirror_section_uid\'] = mirror_section_uid\n
\n \n
payment_uid = selection_params.get(\'payment_uid\', None)\n payment_uid = selection_params.get(\'payment_uid\', None)\n
if payment_uid:\n if payment_uid:\n
params[\'payment_uid\'] = payment_uid\n params[\'payment_uid\'] = payment_uid\n
\n \n
simulation_state = selection_params.get(\'simulation_state\',\n simulation_state = selection_params.get(\'simulation_state\',\n
......
237 238
\ No newline at end of file \ 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