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

all Item_get scripts now support at_date argument

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27297 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c0b005cd
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>current_owner = context.Item_getCurrentOwnerValue()\n <value> <string>current_owner = context.Item_getCurrentOwnerValue(at_date=at_date)\n
if current_owner is not None:\n if current_owner is not None:\n
return current_owner.getTitle()\n return current_owner.getTitle()\n
return None\n return None\n
...@@ -67,7 +67,7 @@ return None\n ...@@ -67,7 +67,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>at_date=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -87,12 +87,13 @@ return None\n ...@@ -87,12 +87,13 @@ return None\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>at_date</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>current_owner</string> <string>current_owner</string>
...@@ -108,7 +109,9 @@ return None\n ...@@ -108,7 +109,9 @@ return None\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -55,8 +55,11 @@ ...@@ -55,8 +55,11 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n <value> <string>from DateTime import DateTime\n
\n \n
date = DateTime()\n if at_date is None:\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(item=context.getRelativeUrl(), at_date=date)\n at_date = DateTime()\n
\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(\n
item=context.getRelativeUrl(), at_date=at_date)\n
\n \n
if len(last_affectation_list) == 0:\n if len(last_affectation_list) == 0:\n
return None\n return None\n
...@@ -75,7 +78,7 @@ return None\n ...@@ -75,7 +78,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>at_date=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -95,19 +98,19 @@ return None\n ...@@ -95,19 +98,19 @@ return None\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>at_date</string>
<string>DateTime</string> <string>DateTime</string>
<string>date</string> <string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>last_affectation_list</string> <string>last_affectation_list</string>
<string>len</string> <string>len</string>
<string>None</string>
<string>_getitem_</string> <string>_getitem_</string>
</tuple> </tuple>
</value> </value>
...@@ -120,7 +123,9 @@ return None\n ...@@ -120,7 +123,9 @@ return None\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>current_site = context.Item_getCurrentSiteValue()\n <value> <string>current_site = context.Item_getCurrentSiteValue(at_date=at_date)\n
if current_site is not None:\n if current_site is not None:\n
return current_site.getTitle()\n return current_site.getTitle()\n
return None\n return None\n
...@@ -67,7 +67,7 @@ return None\n ...@@ -67,7 +67,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>at_date=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -87,12 +87,13 @@ return None\n ...@@ -87,12 +87,13 @@ return None\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>at_date</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>current_site</string> <string>current_site</string>
...@@ -108,7 +109,9 @@ return None\n ...@@ -108,7 +109,9 @@ return None\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -55,8 +55,11 @@ ...@@ -55,8 +55,11 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n <value> <string>from DateTime import DateTime\n
\n \n
date = DateTime()\n if at_date is None:\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(item=context.getRelativeUrl(), at_date=date)\n at_date = DateTime()\n
\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(\n
item=context.getRelativeUrl(), at_date=at_date)\n
\n \n
if len(last_affectation_list) == 0:\n if len(last_affectation_list) == 0:\n
return None\n return None\n
...@@ -76,7 +79,7 @@ return None\n ...@@ -76,7 +79,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>at_date=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -96,19 +99,19 @@ return None\n ...@@ -96,19 +99,19 @@ return None\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>at_date</string>
<string>DateTime</string> <string>DateTime</string>
<string>date</string> <string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>last_affectation_list</string> <string>last_affectation_list</string>
<string>len</string> <string>len</string>
<string>None</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>site</string> <string>site</string>
</tuple> </tuple>
...@@ -122,7 +125,9 @@ return None\n ...@@ -122,7 +125,9 @@ return None\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>resource = context.Item_getResourceValue()\n <value> <string>resource = context.Item_getResourceValue(at_date=at_date)\n
if resource is not None:\n if resource is not None:\n
return resource.getTitle()\n return resource.getTitle()\n
return None\n return None\n
...@@ -67,7 +67,7 @@ return None\n ...@@ -67,7 +67,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>at_date=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -87,12 +87,13 @@ return None\n ...@@ -87,12 +87,13 @@ return None\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>at_date</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>resource</string> <string>resource</string>
...@@ -108,7 +109,9 @@ return None\n ...@@ -108,7 +109,9 @@ return None\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -55,7 +55,9 @@ ...@@ -55,7 +55,9 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n <value> <string>from DateTime import DateTime\n
\n \n
#kw[\'at_date\'] = DateTime()\n if at_date is None:\n
at_date = DateTime()\n
kw[\'at_date\'] = at_date\n
kw[\'item\'] = context.getRelativeUrl()\n kw[\'item\'] = context.getRelativeUrl()\n
\n \n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n
...@@ -80,7 +82,7 @@ return None\n ...@@ -80,7 +82,7 @@ return None\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>at_date=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -100,23 +102,24 @@ return None\n ...@@ -100,23 +102,24 @@ return None\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>at_date</string>
<string>kw</string> <string>kw</string>
<string>DateTime</string> <string>DateTime</string>
<string>None</string>
<string>_write_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>_write_</string>
<string>_apply_</string> <string>_apply_</string>
<string>last_affectation_list</string> <string>last_affectation_list</string>
<string>len</string> <string>len</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>last_affectation</string> <string>last_affectation</string>
<string>None</string>
<string>resource_value</string> <string>resource_value</string>
</tuple> </tuple>
</value> </value>
...@@ -129,7 +132,9 @@ return None\n ...@@ -129,7 +132,9 @@ return None\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -55,7 +55,11 @@ ...@@ -55,7 +55,11 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n <value> <string>from DateTime import DateTime\n
\n \n
kw[\'at_date\'] = DateTime()\n \n
if at_date is None:\n
at_date = DateTime()\n
kw[\'at_date\'] = at_date\n
\n
kw[\'item\'] = context.getRelativeUrl()\n kw[\'item\'] = context.getRelativeUrl()\n
\n \n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n
...@@ -80,7 +84,7 @@ return []\n ...@@ -80,7 +84,7 @@ return []\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>at_date=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -100,14 +104,16 @@ return []\n ...@@ -100,14 +104,16 @@ return []\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>at_date</string>
<string>kw</string> <string>kw</string>
<string>DateTime</string> <string>DateTime</string>
<string>None</string>
<string>_write_</string> <string>_write_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
...@@ -116,7 +122,6 @@ return []\n ...@@ -116,7 +122,6 @@ return []\n
<string>len</string> <string>len</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>last_affectation</string> <string>last_affectation</string>
<string>None</string>
<string>movement</string> <string>movement</string>
</tuple> </tuple>
</value> </value>
...@@ -129,7 +134,9 @@ return []\n ...@@ -129,7 +134,9 @@ return []\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -55,7 +55,10 @@ ...@@ -55,7 +55,10 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n <value> <string>from DateTime import DateTime\n
\n \n
kw[\'at_date\'] = DateTime()\n if at_date is None:\n
at_date = DateTime()\n
kw[\'at_date\'] = at_date\n
\n
kw[\'item\'] = context.getRelativeUrl()\n kw[\'item\'] = context.getRelativeUrl()\n
\n \n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n
...@@ -79,7 +82,7 @@ return []\n ...@@ -79,7 +82,7 @@ return []\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>at_date=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -99,14 +102,16 @@ return []\n ...@@ -99,14 +102,16 @@ return []\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>at_date</string>
<string>kw</string> <string>kw</string>
<string>DateTime</string> <string>DateTime</string>
<string>None</string>
<string>_write_</string> <string>_write_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
...@@ -115,7 +120,6 @@ return []\n ...@@ -115,7 +120,6 @@ return []\n
<string>len</string> <string>len</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>last_affectation</string> <string>last_affectation</string>
<string>None</string>
<string>movement</string> <string>movement</string>
</tuple> </tuple>
</value> </value>
...@@ -128,7 +132,9 @@ return []\n ...@@ -128,7 +132,9 @@ return []\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
163 164
\ 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