[Erp5-report] r19024 - in /erp5/trunk/bt5/erp5_dms: SkinTemplateItem/portal_skins/erp5_dms/...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 4 14:35:38 CET 2008
Author: romain
Date: Mon Feb 4 14:35:37 2008
New Revision: 19024
URL: http://svn.erp5.org?rev=19024&view=rev
Log:
Call getMetadataMappingDict instead of hardcoding a mapping.
Added:
erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_getMetadataMappingDict.xml
Modified:
erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/OOoDocument_updateMetadata.xml
erp5/trunk/bt5/erp5_dms/bt/revision
Added: erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_getMetadataMappingDict.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_getMetadataMappingDict.xml?rev=19024&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_getMetadataMappingDict.xml (added)
+++ erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/OOoDocument_getMetadataMappingDict.xml Mon Feb 4 14:35:37 2008
@@ -1,0 +1,148 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </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>return {\'title\':\'title\',\n
+ \'subject\':\'keywords\',\n
+ \'description\':\'description\',\n
+ \'reference\':\'reference\',\n
+ \'version\':\'version\',\n
+ \'language\':\'language\'}\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>OOoDocument_getMetadataMappingDict</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/OOoDocument_updateMetadata.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/OOoDocument_updateMetadata.xml?rev=19024&r1=19023&r2=19024&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/OOoDocument_updateMetadata.xml (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/OOoDocument_updateMetadata.xml Mon Feb 4 14:35:37 2008
@@ -75,15 +75,9 @@
document = state_change[\'object\']\n
kw = state_change[\'kwargs\']\n
\n
-# XXX hardcoded?\n
# key is a name of erp5 field.\n
# value is a name of document metadata.\n
-metadata_field_mapping_dict = {\'title\':\'title\',\n
- \'subject\':\'keywords\',\n
- \'description\':\'description\',\n
- \'reference\':\'reference\',\n
- \'version\':\'version\',\n
- \'language\':\'language\'}\n
+metadata_field_mapping_dict = document.getMetadataMappingDict()\n
\n
# edit metadata (only if we have OOo file)\n
if document.hasBaseData():\n
@@ -157,8 +151,8 @@
<string>_getitem_</string>
<string>document</string>
<string>kw</string>
+ <string>_getattr_</string>
<string>metadata_field_mapping_dict</string>
- <string>_getattr_</string>
<string>new_metadata</string>
<string>_getiter_</string>
<string>field</string>
Modified: erp5/trunk/bt5/erp5_dms/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/bt/revision?rev=19024&r1=19023&r2=19024&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/bt/revision (original)
+++ erp5/trunk/bt5/erp5_dms/bt/revision Mon Feb 4 14:35:37 2008
@@ -1,1 +1,1 @@
-815
+816
More information about the Erp5-report
mailing list