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 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection_name is None:\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
<value> <string>params = context.portal_selections.getSelectionParamsFor(selection_name)\n
\n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
selection_name=selection_name, selection_params=kw, **kw)\n
params[\'stat\'] = 1\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
if result:\n
return result[0].total_price or 0\n
return 0.\n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
selection=selection,\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>
</item>
<item>
......@@ -78,7 +83,7 @@ return 0.\n
</item>
<item>
<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>
<key> <string>errors</string> </key>
......@@ -98,24 +103,25 @@ return 0.\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>params</string>
<string>None</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>kw</string>
<string>params</string>
<string>_write_</string>
<string>buildSQLQuery</string>
<string>_getitem_</string>
<string>_apply_</string>
<string>result</string>
<string>_getitem_</string>
<string>row</string>
<string>float</string>
</tuple>
</value>
</item>
......@@ -130,13 +136,12 @@ return 0.\n
<tuple>
<none/>
<none/>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_getSourceDebit</string> </value>
<value> <string>AccountingTransactionModule_statSourceCredit</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
......@@ -53,23 +53,25 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection_name is None:\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
<value> <string>params = context.portal_selections.getSelectionParamsFor(selection_name)\n
\n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
selection_name=selection_name, selection_params=kw, **kw)\n
params[\'stat\'] = 1\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
if result:\n
row = result[0]\n
# we do not want -0 to be displayed\n
return (row.total_price and -row.total_price or 0)\n
return 0.\n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
selection=selection, selection_params = params, **params)\n
row = result[0]\n
return float(\'%.02f\' % (row.total_price or 0.0))\n
# vim: syntax=python\n
</string> </value>
</item>
<item>
......@@ -80,7 +82,7 @@ return 0.\n
</item>
<item>
<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>
<key> <string>errors</string> </key>
......@@ -100,25 +102,25 @@ return 0.\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>params</string>
<string>None</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>kw</string>
<string>params</string>
<string>_write_</string>
<string>buildSQLQuery</string>
<string>_getitem_</string>
<string>_apply_</string>
<string>result</string>
<string>_getitem_</string>
<string>row</string>
<string>float</string>
</tuple>
</value>
</item>
......@@ -133,13 +135,12 @@ return 0.\n
<tuple>
<none/>
<none/>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_getSourceCredit</string> </value>
<value> <string>AccountingTransactionModule_statSourceDebit</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
855
\ No newline at end of file
856
\ 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