Commit 0a1596e5 authored by Ivan Tyagov's avatar Ivan Tyagov

Un hardcode list of properties which can be edited on document and use...

Un hardcode list of properties which can be edited on document and use document property introspection to determine it.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33096 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent adb914f5
......@@ -104,12 +104,12 @@ else:\n
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 @@ return document\n
<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>
......
76
\ No newline at end of file
77
\ No newline at end of file
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