Commit e9b00534 authored by Jérome Perrin's avatar Jérome Perrin

Support assignments with a start date but without stop date

parent f88a2f32
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>title</string> <string>default</string>
<string>description</string> <string>description</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -53,6 +54,16 @@ ...@@ -53,6 +54,16 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -65,6 +76,10 @@ ...@@ -65,6 +76,10 @@
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -72,6 +87,12 @@ ...@@ -72,6 +87,12 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>default</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>The End date of an operation</string> </value> <value> <string>The End date of an operation</string> </value>
...@@ -98,4 +119,17 @@ ...@@ -98,4 +119,17 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.hasStopDate() and context.getStopDate()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -355,7 +355,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper): ...@@ -355,7 +355,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper):
if assignment.getStartDate() is not None and \ if assignment.getStartDate() is not None and \
assignment.getStartDate() > login_date: assignment.getStartDate() > login_date:
continue continue
if assignment.getStopDate() is not None and \ if assignment.hasStopDate() and \
assignment.getStopDate() < login_date: assignment.getStopDate() < login_date:
continue continue
valid_assignment_list.append(assignment) valid_assignment_list.append(assignment)
......
...@@ -150,7 +150,7 @@ class ERP5UserManager(BasePlugin): ...@@ -150,7 +150,7 @@ class ERP5UserManager(BasePlugin):
if assignment.getStartDate() is not None and \ if assignment.getStartDate() is not None and \
assignment.getStartDate() > login_date: assignment.getStartDate() > login_date:
continue continue
if assignment.getStopDate() is not None and \ if assignment.hasStopDate() and \
assignment.getStopDate() < login_date: assignment.getStopDate() < login_date:
continue continue
valid_assignment_list.append(assignment) valid_assignment_list.append(assignment)
......
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