Commit 5bf49b0e authored by Nicolas Delaby's avatar Nicolas Delaby

Cleau up kw dictionary only if at_date parameter is default value

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41282 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9ba8263e
......@@ -53,8 +53,11 @@
<value> <string>from DateTime import DateTime\n
portal = context.getPortalObject()\n
\n
default_at_date = False\n
if at_date is None:\n
default_at_date = True\n
at_date = DateTime()\n
\n
kw[\'at_date\'] = at_date\n
kw[\'item\'] = context.getRelativeUrl()\n
\n
......@@ -65,7 +68,7 @@ if kw.get(\'src__\',0):\n
\n
if not last_affectation_list:\n
# Falback in Future inventory\n
if at_date is not None:\n
if default_at_date:\n
del kw[\'at_date\']\n
last_affectation_list = portal.portal_simulation.getFutureTrackingList(**kw)\n
\n
......@@ -118,7 +121,10 @@ return None\n
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>False</string>
<string>default_at_date</string>
<string>None</string>
<string>True</string>
<string>_write_</string>
<string>_apply_</string>
<string>last_affectation_list</string>
......
......@@ -53,7 +53,9 @@
<value> <string>from DateTime import DateTime\n
portal = context.getPortalObject()\n
\n
default_at_date = False\n
if at_date is None:\n
default_at_date = True\n
at_date = DateTime()\n
kw[\'at_date\'] = at_date\n
\n
......@@ -66,7 +68,7 @@ if kw.get(\'src__\',0):\n
\n
if not last_affectation_list:\n
# Falback in Future inventory\n
if at_date is None:\n
if default_at_date:\n
del kw[\'at_date\']\n
last_affectation_list = portal.portal_simulation.getFutureTrackingList(**kw)\n
\n
......@@ -119,7 +121,10 @@ return []\n
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>False</string>
<string>default_at_date</string>
<string>None</string>
<string>True</string>
<string>_write_</string>
<string>_apply_</string>
<string>last_affectation_list</string>
......
......@@ -53,7 +53,9 @@
<value> <string>from DateTime import DateTime\n
portal = context.getPortalObject()\n
\n
default_at_date = False\n
if at_date is None:\n
default_at_date = True\n
at_date = DateTime()\n
kw[\'at_date\'] = at_date\n
\n
......@@ -66,7 +68,7 @@ if kw.get(\'src__\',0):\n
\n
if not last_affectation_list:\n
# Falback in Future inventory\n
if at_date is None:\n
if default_at_date:\n
del kw[\'at_date\']\n
last_affectation_list = portal.portal_simulation.getFutureTrackingList(**kw)\n
\n
......@@ -119,7 +121,10 @@ return []\n
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>False</string>
<string>default_at_date</string>
<string>None</string>
<string>True</string>
<string>_write_</string>
<string>_apply_</string>
<string>last_affectation_list</string>
......
237
\ No newline at end of file
239
\ 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