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

Don't show simulation state column if user selected only one simulation_state in the dialog

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14205 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 21a3e374
...@@ -68,7 +68,9 @@ ...@@ -68,7 +68,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Get the report sections for general ledger\n <value> <string encoding="cdata"><![CDATA[
"""Get the report sections for general ledger\n
"""\n """\n
from Products.ERP5Form.Report import ReportSection\n from Products.ERP5Form.Report import ReportSection\n
request = context.REQUEST\n request = context.REQUEST\n
...@@ -114,7 +116,8 @@ if from_date:\n ...@@ -114,7 +116,8 @@ if from_date:\n
\n \n
result = []\n result = []\n
\n \n
account_columns = (\n if len(simulation_state) > 1:\n
account_columns = (\n
(\'Movement_getSpecificReference\', \'Reference\'),\n (\'Movement_getSpecificReference\', \'Reference\'),\n
(\'Movement_getExplanationTitle\', \'Title\'),\n (\'Movement_getExplanationTitle\', \'Title\'),\n
(\'date\', \'Date\'),\n (\'date\', \'Date\'),\n
...@@ -125,6 +128,17 @@ account_columns = (\n ...@@ -125,6 +128,17 @@ account_columns = (\n
(\'debit\', \'Debit\'),\n (\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\'),\n (\'credit\', \'Credit\'),\n
(\'running_total_price\', \'Net\'), )\n (\'running_total_price\', \'Net\'), )\n
else:\n
account_columns = (\n
(\'Movement_getSpecificReference\', \'Reference\'),\n
(\'Movement_getExplanationTitle\', \'Title\'),\n
(\'date\', \'Date\'),\n
(\'Movement_getExplanationTranslatedPortalType\', \'Type\'),\n
(\'Movement_getExplanationReference\', \'Invoice Number\'),\n
(\'Movement_getMirrorSectionTitle\', \'Third Party\'),\n
(\'debit\', \'Debit\'),\n
(\'credit\', \'Credit\'),\n
(\'running_total_price\', \'Net\'), )\n
\n \n
if gap:\n if gap:\n
gap_value_list = cat_tool.gap.restrictedTraverse(gap)\\\n gap_value_list = cat_tool.gap.restrictedTraverse(gap)\\\n
...@@ -255,7 +269,9 @@ result.append(ReportSection(\n ...@@ -255,7 +269,9 @@ result.append(ReportSection(\n
selection_params=total_params))\n selection_params=total_params))\n
\n \n
return result\n return result\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -326,6 +342,7 @@ return result\n ...@@ -326,6 +342,7 @@ return result\n
<string>dict</string> <string>dict</string>
<string>params</string> <string>params</string>
<string>result</string> <string>result</string>
<string>len</string>
<string>account_columns</string> <string>account_columns</string>
<string>gap_value_list</string> <string>gap_value_list</string>
<string>cat</string> <string>cat</string>
...@@ -337,7 +354,6 @@ return result\n ...@@ -337,7 +354,6 @@ return result\n
<string>strict_account_list</string> <string>strict_account_list</string>
<string>skip_branch</string> <string>skip_branch</string>
<string>account</string> <string>account</string>
<string>len</string>
<string>_apply_</string> <string>_apply_</string>
<string>third_party_brain</string> <string>third_party_brain</string>
<string>third_party_params</string> <string>third_party_params</string>
......
283 284
\ 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