[Erp5-report] r10715 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Oct 14 12:46:32 CEST 2006
Author: jerome
Date: Sat Oct 14 12:46:02 2006
New Revision: 10715
URL: http://svn.erp5.org?rev=10715&view=rev
Log:
Show old value, new value and current value for all properties on the Historical comparisions view.
--This line, and those below, will be ignored--
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison/listbox.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonUrl.xml
M erp5_core/bt/revision
--This line, and those below, will be ignored--
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetTrackingList.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zStatInventory.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventory.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
M erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetInventoryList.xml
M erp5_core/bt/change_log
M erp5_core/bt/revision
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonUrl.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison/listbox.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.xml?rev=10715&r1=10714&r2=10715&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonDifferenceList.xml Sat Oct 14 12:46:02 2006
@@ -69,17 +69,36 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.PythonScripts.standard import Object\n
+from ZODB.POSException import ConflictError\n
+\n
serial = context.REQUEST[\'serial\']\n
+next_serial = context.REQUEST[\'next_serial\']\n
+\n
+try:\n
+ context.HistoricalRevisions[serial]\n
+except ConflictError:\n
+ raise\n
+except: # POSKeyError\n
+ return [Object(property_name=\'Historical revisions are not available, \'\n
+ \'maybe the database has been packed\')]\n
+\n
+if next_serial == \'0.0.0.0\':\n
+ new_getProperty = context.getProperty\n
+else:\n
+ new = context.HistoricalRevisions[next_serial]\n
+ new_getProperty = new.getProperty\n
old = context.HistoricalRevisions[serial]\n
result = []\n
+\n
for prop_dict in context.getPropertyMap():\n
prop = prop_dict[\'id\']\n
old_value = old.getProperty(prop)\n
- current_value = context.getProperty(prop)\n
- if current_value != old_value:\n
+ new_value = new_getProperty(prop)\n
+ if new_value != old_value:\n
result.append( Object( property_name=prop,\n
+ new_value=new_value,\n
old_value=old_value,\n
- current_value=current_value ))\n
+ current_value=context.getProperty(prop)))\n
return result\n
</string> </value>
</item>
@@ -87,6 +106,12 @@
<key> <string>_code</string> </key>
<value>
<none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_dav_writelocks</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
@@ -126,17 +151,22 @@
<string>kw</string>
<string>Products.PythonScripts.standard</string>
<string>Object</string>
+ <string>ZODB.POSException</string>
+ <string>ConflictError</string>
<string>_getitem_</string>
<string>_getattr_</string>
<string>context</string>
<string>serial</string>
+ <string>next_serial</string>
+ <string>new_getProperty</string>
+ <string>new</string>
<string>old</string>
<string>result</string>
<string>_getiter_</string>
<string>prop_dict</string>
<string>prop</string>
<string>old_value</string>
- <string>current_value</string>
+ <string>new_value</string>
</tuple>
</value>
</item>
@@ -164,4 +194,25 @@
</dictionary>
</pickle>
</record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Persistence</string>
+ <string>PersistentMapping</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_container</string> </key>
+ <value>
+ <dictionary/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
</ZopeData>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonUrl.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonUrl.xml?rev=10715&r1=10714&r2=10715&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonUrl.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getHistoricalComparisonUrl.xml Sat Oct 14 12:46:02 2006
@@ -70,8 +70,12 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
-if getattr(brain, \'serial\', \'0.0.0.0\') != \'0.0.0.0\':\n
- return \'Base_viewHistoricalComparison?serial=%s&time=%s\' % (brain.serial, brain.time)\n
+serial = getattr(brain, \'serial\', \'0.0.0.0\')\n
+next_serial = getattr(brain, \'next_serial\', \'0.0.0.0\')\n
+\n
+if serial != \'0.0.0.0\':\n
+ return \'Base_viewHistoricalComparison?serial=%s&next_serial=%s&time=%s\'\\\n
+ % ( serial, next_serial, brain.time )\n
]]></string> </value>
@@ -80,6 +84,12 @@
<key> <string>_code</string> </key>
<value>
<none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_dav_writelocks</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
@@ -119,6 +129,8 @@
<string>brain</string>
<string>kw</string>
<string>getattr</string>
+ <string>serial</string>
+ <string>next_serial</string>
<string>_getattr_</string>
</tuple>
</value>
@@ -147,4 +159,25 @@
</dictionary>
</pickle>
</record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Persistence</string>
+ <string>PersistentMapping</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_container</string> </key>
+ <value>
+ <dictionary/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
</ZopeData>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml?rev=10715&r1=10714&r2=10715&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml Sat Oct 14 12:46:02 2006
@@ -86,6 +86,7 @@
wf_states = context.portal_workflow[workflow_id].states\n
wf_transitions = context.portal_workflow[workflow_id].transitions\n
\n
+next_serial = None\n
for workflow_item in workflow_item_list:\n
# XXX removing str method generate a strange bug\n
o = newTempBase(portal_object, str(i))\n
@@ -118,6 +119,12 @@
if same_type(value, \'\') and key != \'error_message\':\n
value = context.Localizer.erp5_ui.gettext(value)\n
o.setProperty(key, value)\n
+ \n
+ # record current serial as "next serial" for the previous revision\n
+ if next_serial is not None:\n
+ previous_obj.setProperty(\'next_serial\', o.serial)\n
+ next_serial = getattr(o, \'serial\', None)\n
+ previous_obj = o\n
result.append(o)\n
\n
return result\n
@@ -205,6 +212,8 @@
<string>_getitem_</string>
<string>wf_states</string>
<string>wf_transitions</string>
+ <string>None</string>
+ <string>next_serial</string>
<string>workflow_item</string>
<string>str</string>
<string>o</string>
@@ -212,8 +221,9 @@
<string>value</string>
<string>compatibility_name</string>
<string>len</string>
- <string>None</string>
<string>same_type</string>
+ <string>previous_obj</string>
+ <string>getattr</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison.xml?rev=10715&r1=10714&r2=10715&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison.xml Sat Oct 14 12:46:02 2006
@@ -74,7 +74,7 @@
<value>
<dictionary>
<item>
- <key> <string>bottom</string> </key>
+ <key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
@@ -82,19 +82,19 @@
</value>
</item>
<item>
- <key> <string>center</string> </key>
+ <key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
- <key> <string>hidden</string> </key>
+ <key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
- <key> <string>left</string> </key>
+ <key> <string>left</string> </key>
<value>
<list>
<string>old_revision</string>
@@ -102,7 +102,7 @@
</value>
</item>
<item>
- <key> <string>right</string> </key>
+ <key> <string>right</string> </key>
<value>
<list/>
</value>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison/listbox.xml?rev=10715&r1=10714&r2=10715&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison/listbox.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewHistoricalComparison/listbox.xml Sat Oct 14 12:46:02 2006
@@ -332,6 +332,10 @@
<tuple>
<string>old_value</string>
<string>Old Value</string>
+ </tuple>
+ <tuple>
+ <string>new_value</string>
+ <string>New Value</string>
</tuple>
<tuple>
<string>current_value</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory.xml?rev=10715&r1=10714&r2=10715&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewWorkflowHistory.xml Sat Oct 14 12:46:02 2006
@@ -73,7 +73,7 @@
<value>
<dictionary>
<item>
- <key> <string>bottom</string> </key>
+ <key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
@@ -81,19 +81,19 @@
</value>
</item>
<item>
- <key> <string>center</string> </key>
+ <key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
- <key> <string>left</string> </key>
+ <key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
- <key> <string>right</string> </key>
+ <key> <string>right</string> </key>
<value>
<list/>
</value>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=10715&r1=10714&r2=10715&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Sat Oct 14 12:46:02 2006
@@ -1,1 +1,1 @@
-110
+111
More information about the Erp5-report
mailing list