Commit 823e327c authored by Jérome Perrin's avatar Jérome Perrin

Setting a Movement_getExplanationTitle attribute on the first line avoids the

need for is_previous_balance.
Also remove some ugly logs



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10980 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c231cab8
No related merge requests found
...@@ -675,7 +675,7 @@ ...@@ -675,7 +675,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: getattr(request.get(\'cell\', here), \'is_previous_balance\', False) or [(x[0], \'Movement_getExplanationUrl\') for x in form.listbox.get_value(\'columns\')]</string> </value> <value> <string>python: [(x[0], \'Movement_getExplanationUrl\') for x in form.listbox.get_value(\'columns\')]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -709,7 +709,7 @@ ...@@ -709,7 +709,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: getattr(request.get(\'cell\', here), \'is_previous_balance\', False) or [(x[0], \'Movement_getExplanationUrl\') for x in form.listbox.get_value(\'columns\')]</string> </value> <value> <string>python: [(x[0], \'Movement_getExplanationUrl\') for x in form.listbox.get_value(\'columns\')]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -113,8 +113,6 @@ if from_date:\n ...@@ -113,8 +113,6 @@ if from_date:\n
**get_inventory_kw)\n **get_inventory_kw)\n
previous_total_credit = getInventoryAssetPrice(omit_input =True,\n previous_total_credit = getInventoryAssetPrice(omit_input =True,\n
**get_inventory_kw)\n **get_inventory_kw)\n
context.log(\'previous credit (%s) %s\' % (get_inventory_kw, previous_total_credit),\n
getInventoryAssetPrice(omit_input=True, src__=1, **get_inventory_kw))\n
if previous_total_credit != 0:\n if previous_total_credit != 0:\n
previous_total_credit = - previous_total_credit\n previous_total_credit = - previous_total_credit\n
\n \n
...@@ -140,8 +138,12 @@ if from_date:\n ...@@ -140,8 +138,12 @@ if from_date:\n
Movement_getExplanationReference=\'\',\n Movement_getExplanationReference=\'\',\n
Movement_getMirrorSectionTitle=\'\',\n Movement_getMirrorSectionTitle=\'\',\n
Movement_getNodeGapId=\'\',\n Movement_getNodeGapId=\'\',\n
Node_statAccountingBalance=\'\',\n
getTranslatedSimulationStateTitle=\'\',\n getTranslatedSimulationStateTitle=\'\',\n
)\n )\n
if context.getPortalType() == \'Account\':\n
previous_balance.edit(Movement_getExplanationTitle=\'\')\n
\n
new_result = [previous_balance]\n new_result = [previous_balance]\n
if selection.getParams().get(\'hide_grouping\'):\n if selection.getParams().get(\'hide_grouping\'):\n
params[\'where_expression\'] = \'catalog.grouping_reference is NULL\'\n params[\'where_expression\'] = \'catalog.grouping_reference is NULL\'\n
...@@ -156,17 +158,6 @@ if from_date:\n ...@@ -156,17 +158,6 @@ if from_date:\n
**params))\n **params))\n
return new_result\n return new_result\n
\n \n
context.log(\'sql\\nparams=%s\\nsort_on=%s\' % (params, sort_on),\n
portal.portal_simulation.getMovementHistoryList(\n
from_date=from_date,\n
initial_running_total_price=net_balance,\n
# initial_running_quantity=net_balance, TODO\n
selection_domain=selection.getDomain(),\n
selection_domain_join_column=\'section_uid\',\n
sort_on=sort_on,\n
src__=1,\n
**params))\n
\n
if selection.getParams().get(\'hide_grouping\'):\n if selection.getParams().get(\'hide_grouping\'):\n
params[\'where_expression\'] = \'catalog.grouping_reference is NULL\'\n params[\'where_expression\'] = \'catalog.grouping_reference is NULL\'\n
# We try not to convert to a list, hence the copy & paste\n # We try not to convert to a list, hence the copy & paste\n
......
...@@ -71,8 +71,6 @@ ...@@ -71,8 +71,6 @@
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
params = portal.ERP5Accounting_getParams(selection)\n params = portal.ERP5Accounting_getParams(selection)\n
\n \n
context.log(\'stat kw %s\'%kw,\'params %s\'%params)\n
\n
if kw.get(\'node_uid\'):\n if kw.get(\'node_uid\'):\n
params[\'node_uid\'] = kw[\'node_uid\']\n params[\'node_uid\'] = kw[\'node_uid\']\n
if kw.get(\'mirror_section_uid\'):\n if kw.get(\'mirror_section_uid\'):\n
......
111 112
\ 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