Commit 4c6d54c2 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

Use field instead ad-hoc script to presence Dates nicely

parent 0171fdab
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Return the creation date of the current context with\n
a niceer format.\n
\n
TODO:\n
- use a field and form for this purpose\n
"""\n
creation_date = context.getCreationDate()\n
return creation_date.strftime(\'%a, %d %b %Y %H:%M %p\')\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrder_getFormattedCreationDate</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Format creation date</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
<value> <value>
<list> <list>
<string>bottom</string> <string>bottom</string>
<string>hidden</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -65,6 +66,14 @@ ...@@ -65,6 +66,14 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_creation_date</string>
</list>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
......
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
<string>Price</string> <string>Price</string>
</tuple> </tuple>
<tuple> <tuple>
<string>SaleOrder_getFormattedCreationDate</string> <string>creation_date</string>
<string>Order Date</string> <string>Order Date</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -411,7 +411,12 @@ ...@@ -411,7 +411,12 @@
<item> <item>
<key> <string>editable_columns</string> </key> <key> <string>editable_columns</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>creation_date</string>
<string>creation_date</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -529,7 +534,7 @@ ...@@ -529,7 +534,7 @@
<string>Price</string> <string>Price</string>
</tuple> </tuple>
<tuple> <tuple>
<string>SaleOrder_getFormattedCreationDate</string> <string>creation_date</string>
<string>Date</string> <string>Date</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -562,25 +567,7 @@ ...@@ -562,25 +567,7 @@
<item> <item>
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>id</string>
<string>title</string>
<string>SaleOrder_getSaleOrderUrl</string>
</tuple>
<tuple>
<string>SaleOrder_getFormattedTotalPrice</string>
<string>SaleOrder_getSaleOrderUrl</string>
</tuple>
<tuple>
<string>SaleOrder_getFormattedCreationDate</string>
<string>SaleOrder_getSaleOrderUrl</string>
</tuple>
<tuple>
<string>translated_simulation_state</string>
<string>SaleOrder_getSaleOrderUrl</string>
</tuple>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
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