Commit c76429d2 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use selection_name instead of selection.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13804 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ea3dfd15
......@@ -68,11 +68,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection is None:\n
selection = context.getPortalObject()\\\n
.portal_selections.getSelectionFor(\'accounting_selection\')\n
if selection is not None:\n
params.update(selection.getParams())\n
<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
......@@ -80,7 +78,7 @@ kw[\'omit_input\'] = 1\n
kw[\'transaction_uid\'] = context.getUid()\n
\n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
selection=selection, selection_params=kw, **kw)\n
selection_name=selection_name, selection_params=kw, **kw)\n
\n
if result:\n
row = result[0]\n
......@@ -103,7 +101,7 @@ return 0.\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **params</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **params</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -123,7 +121,7 @@ return 0.\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -131,6 +129,7 @@ return 0.\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>params</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -68,11 +68,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection is None:\n
selection = context.getPortalObject()\\\n
.portal_selections.getSelectionFor(\'accounting_selection\')\n
if selection is not None:\n
params.update(selection.getParams())\n
<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
......@@ -80,7 +78,7 @@ kw[\'omit_output\'] = 1\n
kw[\'transaction_uid\'] = context.getUid()\n
\n
result = context.AccountingTransactionModule_zGetAccountingTransactionList(\n
selection=selection, selection_params=kw, **kw)\n
selection_name=selection_name, selection_params=kw, **kw)\n
\n
if result:\n
return result[0].total_price or 0\n
......@@ -101,7 +99,7 @@ return 0.\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **params</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **params</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -121,7 +119,7 @@ return 0.\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -129,6 +127,7 @@ return 0.\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>params</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -229,6 +229,17 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>None</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>selection_params</string> </key>
<value>
......@@ -292,31 +303,32 @@
<key> <string>_keys</string> </key>
<value>
<list>
<string>selection</string>
<string>selection_domain</string>
<string>selection_report</string>
<string>selection_params</string>
<string>select_expression</string>
<string>from_date</string>
<string>at_date</string>
<string>to_date</string>
<string>node</string>
<string>resource</string>
<string>entity</string>
<string>stat</string>
<string>omit_input</string>
<string>omit_output</string>
<string>amount</string>
<string>amount_range_min</string>
<string>amount_range_max</string>
<string>creation_date_range_min</string>
<string>creation_date_range_max</string>
<string>section_category</string>
<string>count</string>
<string>transaction_uid</string>
<string>specific_reference</string>
<string>no_limit</string>
<string>search_result_keys</string>
<string>selection</string>
<string>selection_name</string>
<string>selection_domain</string>
<string>selection_report</string>
<string>selection_params</string>
<string>select_expression</string>
<string>from_date</string>
<string>at_date</string>
<string>to_date</string>
<string>node</string>
<string>resource</string>
<string>entity</string>
<string>stat</string>
<string>omit_input</string>
<string>omit_output</string>
<string>amount</string>
<string>amount_range_min</string>
<string>amount_range_max</string>
<string>creation_date_range_min</string>
<string>creation_date_range_max</string>
<string>section_category</string>
<string>count</string>
<string>transaction_uid</string>
<string>specific_reference</string>
<string>no_limit</string>
<string>search_result_keys</string>
</list>
</value>
</item>
......@@ -334,6 +346,7 @@
<item>
<key> <string>arguments_src</string> </key>
<value> <string>selection\r\n
selection_name=None\r\n
selection_domain\r\n
selection_report\r\n
selection_params=""\r\n
......@@ -524,9 +537,9 @@ WHERE\n
<dtml-if omit_output> AND stock.total_price > 0\n
AND stock.uid = movement.uid\n
</dtml-if>\n
<dtml-if expr="selection is not None and selection.isInvertMode() and len(selection.getInvertModeUidList()) > 0">\n
<dtml-if expr="selection_name is not None and portal_selections.getSelectionInvertModeFor(selection_name) and len(context.portal_selections.getSelectionInvertModeUidListFor(selection_name)) > 0">\n
AND ( 0 = 1\n
<dtml-in expr="selection.getInvertModeUidList()">\n
<dtml-in expr="context.portal_selections.getSelectionInvertModeUidListFor(selection_name)">\n
OR catalog.uid = <dtml-var sequence-item>\n
</dtml-in>\n
)\n
......@@ -710,9 +723,9 @@ WHERE\n
<dtml-if omit_output> AND stock.total_price > 0\n
AND stock.uid = movement.uid\n
</dtml-if>\n
<dtml-if expr="selection is not None and selection.isInvertMode() and len(selection.getInvertModeUidList()) > 0">\n
<dtml-if expr="selection_name is not None and portal_selections.getSelectionInvertModeFor(selection_name) and len(context.portal_selections.getSelectionInvertModeUidListFor(selection_name)) > 0">\n
AND ( 0 = 1\n
<dtml-in expr="selection.getInvertModeUidList()">\n
<dtml-in expr="context.portal_selections.getSelectionInvertModeUidListFor(selection_name)">\n
OR catalog.uid = <dtml-var sequence-item>\n
</dtml-in>\n
)\n
......
......@@ -68,11 +68,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection is None:\n
<value> <string>if selection_name is None:\n
# TODO: this should definitivly be REQUEST chached\n
selection = context.portal_selections.getSelectionFor(\'accounting_selection\')\n
selection_name = \'accounting_selection\'\n
\n
section_category=selection.getParams().get(\'section_category\')\n
section_category=context.portal_selections.getSelectionParamsFor(selection_name).get(\'section_category\')\n
if not section_category:\n
return\n
\n
......@@ -107,7 +107,7 @@ return transaction.getStartDate()\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **kw</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -127,7 +127,7 @@ return transaction.getStartDate()\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -135,6 +135,7 @@ return transaction.getStartDate()\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>kw</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -68,11 +68,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection is None:\n
<value> <string>if selection_name is None:\n
# TODO: this should definitivly be REQUEST chached\n
selection = context.portal_selections.getSelectionFor(\'accounting_selection\')\n
selection_name = \'accounting_selection\'\n
\n
section_category=selection.getParams().get(\'section_category\')\n
section_category=context.portal_selections.getSelectionParamsFor(selection_name).get(\'section_category\')\n
if not section_category:\n
return\n
\n
......@@ -107,7 +107,7 @@ return transaction.getSourcePaymentReference()\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **kw</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -127,7 +127,7 @@ return transaction.getSourcePaymentReference()\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -135,6 +135,7 @@ return transaction.getSourcePaymentReference()\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>kw</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -68,11 +68,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection is None:\n
<value> <string>if selection_name is None:\n
# TODO: this should definitivly be REQUEST chached\n
selection = context.portal_selections.getSelectionFor(\'accounting_selection\')\n
selection_name = \'accounting_selection\'\n
\n
section_category=selection.getParams().get(\'section_category\')\n
section_category=context.portal_selections.getSelectionParamsFor(selection_name).get(\'section_category\')\n
if not section_category:\n
return\n
\n
......@@ -111,7 +111,7 @@ if payment_node is not None:\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **kw</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -131,7 +131,7 @@ if payment_node is not None:\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -139,6 +139,7 @@ if payment_node is not None:\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>kw</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -68,11 +68,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection is None:\n
<value> <string>if selection_name is None:\n
# TODO: this should definitivly be REQUEST chached\n
selection = context.portal_selections.getSelectionFor(\'accounting_selection\')\n
selection_name = \'accounting_selection\'\n
\n
section_category=selection.getParams().get(\'section_category\')\n
section_category=context.portal_selections.getSelectionParamsFor(selection_name).get(\'section_category\')\n
if not section_category:\n
return\n
\n
......@@ -112,7 +112,7 @@ return mirror_payment.getSourceFreeText()\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **kw</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -132,7 +132,7 @@ return mirror_payment.getSourceFreeText()\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -140,6 +140,7 @@ return mirror_payment.getSourceFreeText()\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>kw</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -68,11 +68,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if selection is None:\n
<value> <string>if selection_name is None:\n
# TODO: this should definitivly be REQUEST chached\n
selection = context.portal_selections.getSelectionFor(\'accounting_selection\')\n
selection_name = \'accounting_selection\'\n
\n
section_category=selection.getParams().get(\'section_category\')\n
section_category=context.portal_selections.getSelectionParamsFor(selection_name).get(\'section_category\')\n
if not section_category:\n
return\n
\n
......@@ -111,7 +111,7 @@ if payment_node is not None:\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **kw</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -131,7 +131,7 @@ if payment_node is not None:\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -139,6 +139,7 @@ if payment_node is not None:\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>kw</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -71,11 +71,11 @@
<value> <string>"""Return the \'side-specific\' reference, ie. the source reference or\n
destination reference.\n
"""\n
if selection is None:\n
if selection_name is None:\n
# TODO: this should definitivly be REQUEST chached\n
selection = context.portal_selections.getSelectionFor(\'accounting_selection\')\n
selection_name = \'accounting_selection\'\n
\n
section_category=selection.getParams().get(\'section_category\')\n
section_category=context.portal_selections.getSelectionParamsFor(selection_name).get(\'section_category\')\n
if not section_category:\n
return\n
\n
......@@ -110,7 +110,7 @@ return transaction.getDestinationReference()\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **kwd</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **kwd</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -130,7 +130,7 @@ return transaction.getDestinationReference()\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -138,6 +138,7 @@ return transaction.getDestinationReference()\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>kwd</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -69,11 +69,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string># XXX bad name: AccountingTransaction_getMirrorSectionTitle sounds more consistent\n
if selection is None:\n
if selection_name is None:\n
# TODO: this should definitivly be REQUEST chached\n
selection = context.portal_selections.getSelectionFor(\'accounting_selection\')\n
selection_name = \'accounting_selection\'\n
\n
section_category=selection.getParams().get(\'section_category\')\n
section_category=context.portal_selections.getSelectionParamsFor(selection_name).get(\'section_category\')\n
if not section_category:\n
return\n
\n
......@@ -102,7 +102,7 @@ return transaction.getSourceSectionTitle()\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **kw</string> </value>
<value> <string>brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -122,7 +122,7 @@ return transaction.getSourceSectionTitle()\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -130,6 +130,7 @@ return transaction.getSourceSectionTitle()\n
<tuple>
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
<string>kw</string>
<string>None</string>
<string>_getattr_</string>
......
......@@ -78,8 +78,8 @@ precision = context.Base_getPreferredPrecision()\n
###\n
# Merge selection parameters in kw\n
selection_params = None\n
if selection is not None:\n
selection_params = selection.getParams()\n
if selection_name is not None:\n
selection_params = context.portal_selections.getSelectionParamsFor(selection_name)\n
kw.update(selection_params)\n
\n
###\n
......@@ -224,7 +224,7 @@ return context.Base_getRoundValue(row.total_price or 0.0, precision)\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>selection, **kw</string> </value>
<value> <string>selection, selection_name, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......@@ -252,13 +252,14 @@ return context.Base_getRoundValue(row.total_price or 0.0, precision)\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>selection</string>
<string>selection_name</string>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
......
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