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 @@
</item>
<item>
<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
return current_owner.getTitle()\n
return None\n
......@@ -67,7 +67,7 @@ return None\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>at_date=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -87,12 +87,13 @@ return None\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>at_date</string>
<string>_getattr_</string>
<string>context</string>
<string>current_owner</string>
......@@ -108,7 +109,9 @@ return None\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
......
......@@ -55,8 +55,11 @@
<key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n
\n
date = DateTime()\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(item=context.getRelativeUrl(), at_date=date)\n
if at_date is None:\n
at_date = DateTime()\n
\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(\n
item=context.getRelativeUrl(), at_date=at_date)\n
\n
if len(last_affectation_list) == 0:\n
return None\n
......@@ -75,7 +78,7 @@ return None\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>at_date=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -95,19 +98,19 @@ return None\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>at_date</string>
<string>DateTime</string>
<string>date</string>
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>last_affectation_list</string>
<string>len</string>
<string>None</string>
<string>_getitem_</string>
</tuple>
</value>
......@@ -120,7 +123,9 @@ return None\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
......
......@@ -53,7 +53,7 @@
</item>
<item>
<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
return current_site.getTitle()\n
return None\n
......@@ -67,7 +67,7 @@ return None\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>at_date=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -87,12 +87,13 @@ return None\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>at_date</string>
<string>_getattr_</string>
<string>context</string>
<string>current_site</string>
......@@ -108,7 +109,9 @@ return None\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
......
......@@ -55,8 +55,11 @@
<key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\n
\n
date = DateTime()\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(item=context.getRelativeUrl(), at_date=date)\n
if at_date is None:\n
at_date = DateTime()\n
\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(\n
item=context.getRelativeUrl(), at_date=at_date)\n
\n
if len(last_affectation_list) == 0:\n
return None\n
......@@ -76,7 +79,7 @@ return None\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>at_date=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -96,19 +99,19 @@ return None\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>at_date</string>
<string>DateTime</string>
<string>date</string>
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>last_affectation_list</string>
<string>len</string>
<string>None</string>
<string>_getitem_</string>
<string>site</string>
</tuple>
......@@ -122,7 +125,9 @@ return None\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
......
......@@ -53,7 +53,7 @@
</item>
<item>
<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
return resource.getTitle()\n
return None\n
......@@ -67,7 +67,7 @@ return None\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>at_date=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -87,12 +87,13 @@ return None\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>at_date</string>
<string>_getattr_</string>
<string>context</string>
<string>resource</string>
......@@ -108,7 +109,9 @@ return None\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
......
......@@ -55,7 +55,9 @@
<key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\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
\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n
......@@ -80,7 +82,7 @@ return None\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string>at_date=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -100,23 +102,24 @@ return None\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>at_date</string>
<string>kw</string>
<string>DateTime</string>
<string>None</string>
<string>_write_</string>
<string>_getattr_</string>
<string>context</string>
<string>_write_</string>
<string>_apply_</string>
<string>last_affectation_list</string>
<string>len</string>
<string>_getitem_</string>
<string>last_affectation</string>
<string>None</string>
<string>resource_value</string>
</tuple>
</value>
......@@ -129,7 +132,9 @@ return None\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
......
......@@ -55,7 +55,11 @@
<key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\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
\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n
......@@ -80,7 +84,7 @@ return []\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string>at_date=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -100,14 +104,16 @@ return []\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>at_date</string>
<string>kw</string>
<string>DateTime</string>
<string>None</string>
<string>_write_</string>
<string>_getattr_</string>
<string>context</string>
......@@ -116,7 +122,6 @@ return []\n
<string>len</string>
<string>_getitem_</string>
<string>last_affectation</string>
<string>None</string>
<string>movement</string>
</tuple>
</value>
......@@ -129,7 +134,9 @@ return []\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
......
......@@ -55,7 +55,10 @@
<key> <string>_body</string> </key>
<value> <string>from DateTime import DateTime\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
\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(**kw)\n
......@@ -79,7 +82,7 @@ return []\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string>at_date=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -99,14 +102,16 @@ return []\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>at_date</string>
<string>kw</string>
<string>DateTime</string>
<string>None</string>
<string>_write_</string>
<string>_getattr_</string>
<string>context</string>
......@@ -115,7 +120,6 @@ return []\n
<string>len</string>
<string>_getitem_</string>
<string>last_affectation</string>
<string>None</string>
<string>movement</string>
</tuple>
</value>
......@@ -128,7 +132,9 @@ return []\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
......
163
\ No newline at end of file
164
\ 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