[Erp5-report] r33096 ivan - in /erp5/trunk/bt5/erp5_ingestion: SkinTemplateItem/portal_skin...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 24 16:07:11 CET 2010
Author: ivan
Date: Wed Feb 24 16:07:10 2010
New Revision: 33096
URL: http://svn.erp5.org?rev=33096&view=rev
Log:
Un hardcode list of properties which can be edited on document and use document property introspection to determine it.
Modified:
erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml
erp5/trunk/bt5/erp5_ingestion/bt/revision
Modified: erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml?rev=33096&r1=33095&r2=33096&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml [utf8] Wed Feb 24 16:07:10 2010
@@ -104,12 +104,12 @@
file_name=file_name)\n
is_existing_document_updated = (merged_document!=document)\n
document = merged_document\n
- # XXX: introspect document and find editable properties\n
- # then use kw and try to get values in two available modes the\n
- # script coulb be called: from ERP5 From or directly from Python script\n
+ # introspect document and find editable properties\n
+ # then use kw and try to get values in two available modes: the\n
+ # script coulbe be called: from ERP5 From or directly from Python script\n
document_edit_kw = {}\n
- for key in [\'title\', \'reference\', \'group\', \'source_project\', \n
- \'short_title\', \'language\', \'version\', \'description\']:\n
+ property_id_list = document.propertyIds()\n
+ for key in property_id_list:\n
value = kw.get(key, kw.get(\'field_your_%s\' %key, kw.get(\'field_my_%s\' %key, None)))\n
if value not in MARKER:\n
document_edit_kw[key] = value\n
@@ -210,6 +210,7 @@
<string>is_existing_document_updated</string>
<string>merged_document</string>
<string>document_edit_kw</string>
+ <string>property_id_list</string>
<string>_getiter_</string>
<string>key</string>
<string>value</string>
Modified: erp5/trunk/bt5/erp5_ingestion/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ingestion/bt/revision?rev=33096&r1=33095&r2=33096&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ingestion/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_ingestion/bt/revision [utf8] Wed Feb 24 16:07:10 2010
@@ -1,1 +1,1 @@
-76
+77
More information about the Erp5-report
mailing list