Commit 514e70ff authored by Jérome Perrin's avatar Jérome Perrin

wrong scripts have been removed in r25373, fix this mistake by restoring them...

wrong scripts have been removed in r25373, fix this mistake by restoring them and removing the good ones

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25386 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c3c74114
...@@ -53,21 +53,26 @@ ...@@ -53,21 +53,26 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if selection_name is None:\n <value> <string>params = context.portal_selections.getSelectionParamsFor(selection_name)\n
selection_name = \'accounting_selection\'\n
params.update(context.portal_selections.getSelectionParamsFor(selection_name))\n
kw = {}\n
kw[\'section_category\'] = params.get(\'section_category\')\n
kw[\'stat\'] = 1\n
kw[\'omit_output\'] = 1\n
kw[\'transaction_uid\'] = context.getUid()\n
\n \n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n params[\'stat\'] = 1\n
selection_name=selection_name, selection_params=kw, **kw)\n params[\'omit_input\'] = 1\n
params[\'omit_output\'] = 0\n
\n
if params.get(\'operation_date\', {}).get(\'query\'):\n
buildSQLQuery = context.portal_catalog.buildSQLQuery\n
params[\'source_section_where_expression\'] = buildSQLQuery(\n
**{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n
params[\'destination_section_where_expression\'] = buildSQLQuery(\n
**{\'delivery.stop_date\': params[\'operation_date\']})[\'where_expression\']\n
del params[\'operation_date\']\n
\n \n
if result:\n result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
return result[0].total_price or 0\n selection=selection,\n
return 0.\n selection_params=params, **params)\n
row = result[0]\n
return float(\'%.02f\' % (row.total_price and - row.total_price or 0.0))\n
# vim: syntax=python\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -78,7 +83,7 @@ return 0.\n ...@@ -78,7 +83,7 @@ return 0.\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, selection_name=None, **params</string> </value> <value> <string>selection=None, selection_name=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -98,24 +103,25 @@ return 0.\n ...@@ -98,24 +103,25 @@ return 0.\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>3</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>brain</string>
<string>selection</string> <string>selection</string>
<string>selection_name</string> <string>selection_name</string>
<string>params</string> <string>kw</string>
<string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>kw</string> <string>params</string>
<string>_write_</string> <string>_write_</string>
<string>buildSQLQuery</string>
<string>_getitem_</string>
<string>_apply_</string> <string>_apply_</string>
<string>result</string> <string>result</string>
<string>_getitem_</string> <string>row</string>
<string>float</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -130,13 +136,12 @@ return 0.\n ...@@ -130,13 +136,12 @@ return 0.\n
<tuple> <tuple>
<none/> <none/>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_getSourceDebit</string> </value> <value> <string>AccountingTransactionModule_statSourceCredit</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -53,23 +53,25 @@ ...@@ -53,23 +53,25 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if selection_name is None:\n <value> <string>params = context.portal_selections.getSelectionParamsFor(selection_name)\n
selection_name = \'accounting_selection\'\n
params.update(context.portal_selections.getSelectionParamsFor(selection_name))\n
kw = {}\n
kw[\'section_category\'] = params.get(\'section_category\')\n
kw[\'stat\'] = 1\n
kw[\'omit_input\'] = 1\n
kw[\'transaction_uid\'] = context.getUid()\n
\n \n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n params[\'stat\'] = 1\n
selection_name=selection_name, selection_params=kw, **kw)\n params[\'omit_output\'] = 1\n
params[\'omit_input\'] = 0\n
\n
if params.get(\'operation_date\', {}).get(\'query\'):\n
buildSQLQuery = context.portal_catalog.buildSQLQuery\n
params[\'source_section_where_expression\'] = buildSQLQuery(\n
**{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n
params[\'destination_section_where_expression\'] = buildSQLQuery(\n
**{\'delivery.stop_date\': params[\'operation_date\']})[\'where_expression\']\n
del params[\'operation_date\']\n
\n \n
if result:\n result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
row = result[0]\n selection=selection, selection_params = params, **params)\n
# we do not want -0 to be displayed\n row = result[0]\n
return (row.total_price and -row.total_price or 0)\n return float(\'%.02f\' % (row.total_price or 0.0))\n
return 0.\n # vim: syntax=python\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -80,7 +82,7 @@ return 0.\n ...@@ -80,7 +82,7 @@ return 0.\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, selection_name=None, **params</string> </value> <value> <string>selection=None, selection_name=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -100,25 +102,25 @@ return 0.\n ...@@ -100,25 +102,25 @@ return 0.\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>3</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>brain</string>
<string>selection</string> <string>selection</string>
<string>selection_name</string> <string>selection_name</string>
<string>params</string> <string>kw</string>
<string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>kw</string> <string>params</string>
<string>_write_</string> <string>_write_</string>
<string>buildSQLQuery</string>
<string>_getitem_</string>
<string>_apply_</string> <string>_apply_</string>
<string>result</string> <string>result</string>
<string>_getitem_</string>
<string>row</string> <string>row</string>
<string>float</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -133,13 +135,12 @@ return 0.\n ...@@ -133,13 +135,12 @@ return 0.\n
<tuple> <tuple>
<none/> <none/>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_getSourceCredit</string> </value> <value> <string>AccountingTransactionModule_statSourceDebit</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
855 856
\ 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