Commit 04bd1934 authored by Jérome Perrin's avatar Jérome Perrin

- fix problem when "operation_date" is a string in REQUEST (like it is the case with new listbox)

- use 'preferences' in TALES

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41554 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d9762354
...@@ -60,7 +60,7 @@ kw[\'omit_output\'] = 0\n ...@@ -60,7 +60,7 @@ kw[\'omit_output\'] = 0\n
kw[\'source_section_where_expression\'] = \'\'\n kw[\'source_section_where_expression\'] = \'\'\n
kw[\'destination_section_where_expression\'] = \'\'\n kw[\'destination_section_where_expression\'] = \'\'\n
\n \n
if kw.get(\'operation_date\', {}).get(\'query\'):\n if (kw.get(\'operation_date\') or {}).get(\'query\'):\n
buildSQLQuery = context.portal_catalog.buildSQLQuery\n buildSQLQuery = context.portal_catalog.buildSQLQuery\n
kw[\'source_section_where_expression\'] = buildSQLQuery(\n kw[\'source_section_where_expression\'] = buildSQLQuery(\n
**{\'delivery.start_date\': kw[\'operation_date\']})[\'where_expression\']\n **{\'delivery.start_date\': kw[\'operation_date\']})[\'where_expression\']\n
...@@ -76,14 +76,77 @@ return context.AccountingTransactionModule_zGetAccountingTransactionList( select ...@@ -76,14 +76,77 @@ return context.AccountingTransactionModule_zGetAccountingTransactionList( select
**kw )\n **kw )\n
</string> </value> </string> </value>
</item> </item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>brain=None, selection=None, **kw</string> </value> <value> <string>brain=None, selection=None, **kw</string> </value>
</item> </item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>brain</string>
<string>selection</string>
<string>kw</string>
<string>_getattr_</string>
<string>_write_</string>
<string>context</string>
<string>buildSQLQuery</string>
<string>_getitem_</string>
<string>_apply_</string>
<string>None</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<none/>
</tuple>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_countAccountingTransactionList</string> </value> <value> <string>AccountingTransactionModule_countAccountingTransactionList</string> </value>
</item> </item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -78,7 +78,7 @@ params[\'omit_output\'] = 0\n ...@@ -78,7 +78,7 @@ params[\'omit_output\'] = 0\n
params[\'source_section_where_expression\'] = \'\'\n params[\'source_section_where_expression\'] = \'\'\n
params[\'destination_section_where_expression\'] = \'\'\n params[\'destination_section_where_expression\'] = \'\'\n
\n \n
if params.get(\'operation_date\', {}).get(\'query\'):\n if (params.get(\'operation_date\') or {}).get(\'query\'):\n
buildSQLQuery = context.portal_catalog.buildSQLQuery\n buildSQLQuery = context.portal_catalog.buildSQLQuery\n
params[\'source_section_where_expression\'] = buildSQLQuery(\n params[\'source_section_where_expression\'] = buildSQLQuery(\n
**{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n **{\'delivery.start_date\': params[\'operation_date\']})[\'where_expression\']\n
...@@ -104,14 +104,74 @@ return context.AccountingTransactionModule_zGetAccountingTransactionList( \n ...@@ -104,14 +104,74 @@ return context.AccountingTransactionModule_zGetAccountingTransactionList( \n
]]></string> </value> ]]></string> </value>
</item> </item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**params</string> </value> <value> <string>**params</string> </value>
</item> </item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>params</string>
<string>_write_</string>
<string>_getattr_</string>
<string>context</string>
<string>buildSQLQuery</string>
<string>_getitem_</string>
<string>_apply_</string>
<string>src__</string>
<string>None</string>
<string>search_result_keys</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>AccountingTransactionModule_getAccountingTransactionList</string> </value> <value> <string>AccountingTransactionModule_getAccountingTransactionList</string> </value>
</item> </item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -576,7 +576,7 @@ ...@@ -576,7 +576,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:[(\'section_category\', here.portal_preferences.getPreferredAccountingTransactionSectionCategory()), (\'section_category_strict\', here.portal_preferences.getPreferredAccountingSectionCategoryStrict())]</string> </value> <value> <string>python:[(\'section_category\', preferences.getPreferredAccountingTransactionSectionCategory()), (\'section_category_strict\', preferences.getPreferredAccountingSectionCategoryStrict())]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
1413 1414
\ 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