[Erp5-report] r42752 kazuhiko - in /erp5/trunk/products: ERP5/Document/ ERP5/bootstrap/erp5...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jan 28 16:47:42 CET 2011
Author: kazuhiko
Date: Fri Jan 28 16:47:42 2011
New Revision: 42752
URL: http://svn.erp5.org?rev=42752&view=rev
Log:
* support 'Paths of objects whose workflow history should be kept' and 'Paths of objects that should be kept' in Business Template definition.
* support more 'Removed but ...' and 'Modified but ...' cases in business template installation dialogue.
Added:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_path_list.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_workflow_path_list.xml
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getDiffUrl.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getModifiedObject.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewInstallationDialog/listbox_choice.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getDetailedDiff.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getModifiedObjectList.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_viewMultiInstallationDialog/listbox_choice.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
erp5/trunk/products/ERP5PropertySheetLegacy/PropertySheet/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Fri Jan 28 16:47:42 2011
@@ -839,10 +839,16 @@ class ObjectTemplateItem(BaseTemplateIte
new_io.close()
old_io.close()
if new_obj_xml != old_obj_xml:
- modified_object_list[path] = 'Modified', type_name
+ if context.isKeepObject(path):
+ modified_object_list[path] = 'Modified but should be kept', type_name
+ else:
+ modified_object_list[path] = 'Modified', type_name
# get removed object
for path in set(installed_item._objects) - set(self._objects):
- modified_object_list[path] = 'Removed', type_name
+ if context.isKeepObject(path):
+ modified_object_list[path] = 'Removed but should be kept', type_name
+ else:
+ modified_object_list[path] = 'Removed', type_name
return modified_object_list
def _backupObject(self, action, trashbin, container_path, object_id, **kw):
@@ -966,6 +972,10 @@ class ObjectTemplateItem(BaseTemplateIte
action = update_dict[path]
if action == 'nothing':
continue
+ elif context.isKeepObject(path):
+ # do nothing if the object is specified in keep list in
+ # force mode.
+ continue
# get subobjects in path
path_list = path.split('/')
container_path = path_list[:-1]
@@ -993,6 +1003,7 @@ class ObjectTemplateItem(BaseTemplateIte
saved_uid_dict = {}
subobjects_dict = {}
portal_type_dict = {}
+ workflow_history = None
old_obj = container._getOb(object_id, None)
object_existed = old_obj is not None
if old_obj is not None:
@@ -1015,6 +1026,11 @@ class ObjectTemplateItem(BaseTemplateIte
portal_type_dict[attr] = getattr(old_obj, attr, ())
portal_type_dict['workflow_chain'] = \
getChainByType(context)[1].get('chain_' + object_id, '')
+ # try to keep workflow history for specified objects.
+ workflow_history = getattr(old_obj, 'workflow_history', None)
+ if workflow_history is not None \
+ and context.isKeepWorkflowObject(path):
+ workflow_history = deepcopy(workflow_history)
container.manage_delObjects([object_id])
# install object
@@ -1093,6 +1109,9 @@ class ObjectTemplateItem(BaseTemplateIte
# an object which cannot (e.g. External Method).
LOG('BusinessTemplate', WARNING,
'could not restore %r in %r' % (subobject_id, obj))
+ # copy workflow history if required
+ if workflow_history is not None:
+ setattr(obj, 'workflow_history', workflow_history)
if obj.meta_type in ('Z SQL Method',):
fixZSQLMethod(portal, obj)
# portal transforms specific initialization
@@ -5044,6 +5063,30 @@ Business Template is a set of definition
"""
return self._getOrderedList('template_tool_id')
+ def isKeepObject(self, path):
+ """
+ Return True if path is included in keep object list.
+ """
+ keep_list = self.getTemplateKeepPathList()
+ for keep_path in keep_list:
+ if keep_path.endswith('**') and path.startswith(keep_path[:-2]):
+ return True
+ elif path == keep_path:
+ return True
+ return False
+
+ def isKeepWorkflowObject(self, path):
+ """
+ Return True if path is included in keep workflow object list.
+ """
+ keep_list = self.getTemplateKeepWorkflowPathList()
+ for keep_path in keep_list:
+ if keep_path.endswith('**') and path.startswith(keep_path[:-2]):
+ return True
+ elif path == keep_path:
+ return True
+ return False
+
security.declareProtected(Permissions.ManagePortal, 'export')
def export(self, path=None, local=0, **kw):
"""
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getDiffUrl.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getDiffUrl.xml?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getDiffUrl.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getDiffUrl.xml [utf8] Fri Jan 28 16:47:42 2011
@@ -54,7 +54,7 @@
from Products.PythonScripts.standard import html_quote\n
\n
-if brain.object_state == \'Modified\':\n
+if brain.object_state.startswith(\'Modified\'):\n
target_object = brain.getObject()\n
parent_absolute_path = target_object.aq_parent.absolute_url()\n
if hasattr(brain, \'bt1\'):\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getModifiedObject.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getModifiedObject.xml?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getModifiedObject.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getModifiedObject.xml [utf8] Fri Jan 28 16:47:42 2011
@@ -99,12 +99,12 @@ for object_id in keys:\n
line = newTempBase(context, \'tmp_install_%s\' %(str(i)))\n
if object_state == \'New\':\n
choice_item_list=[[install_title, \'install\']]\n
- elif object_state == \'Modified\':\n
+ elif object_state.startswith(\'Modified\'):\n
if object_class in no_backup_dict:\n
choice_item_list=[[upgrade_title, \'install\']]\n
else:\n
choice_item_list=[[backup_title, \'backup\']]\n
- elif object_state in (\'Removed\', \'Removed but used\'):\n
+ elif object_state.startswith(\'Removed\'):\n
if object_class in no_backup_dict:\n
choice_item_list=[[remove_title, \'remove\']]\n
else:\n
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_path_list.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_path_list.xml?rev=42752&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_path_list.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_path_list.xml [utf8] Fri Jan 28 16:47:42 2011
@@ -0,0 +1,298 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="LinesField" module="Products.Formulator.StandardFields"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>my_template_keep_path_list</string> </value>
+ </item>
+ <item>
+ <key> <string>message_values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>external_validator_failed</string> </key>
+ <value> <string>The input failed the external validator.</string> </value>
+ </item>
+ <item>
+ <key> <string>line_too_long</string> </key>
+ <value> <string>A line was too long.</string> </value>
+ </item>
+ <item>
+ <key> <string>required_not_found</string> </key>
+ <value> <string>Input is required but no input given.</string> </value>
+ </item>
+ <item>
+ <key> <string>too_long</string> </key>
+ <value> <string>You entered too many characters.</string> </value>
+ </item>
+ <item>
+ <key> <string>too_many_lines</string> </key>
+ <value> <string>You entered too many lines.</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>overrides</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>height</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_linelength</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_lines</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>view_separator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>width</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>tales</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>height</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_linelength</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_lines</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>view_separator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>width</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>height</string> </key>
+ <value> <int>10</int> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_linelength</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_lines</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Paths of objects that should be kept</string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>view_separator</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+<br/>
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>width</string> </key>
+ <value> <int>80</int> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_workflow_path_list.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_workflow_path_list.xml?rev=42752&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_workflow_path_list.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_template_keep_workflow_path_list.xml [utf8] Fri Jan 28 16:47:42 2011
@@ -0,0 +1,298 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="LinesField" module="Products.Formulator.StandardFields"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>my_template_keep_workflow_path_list</string> </value>
+ </item>
+ <item>
+ <key> <string>message_values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>external_validator_failed</string> </key>
+ <value> <string>The input failed the external validator.</string> </value>
+ </item>
+ <item>
+ <key> <string>line_too_long</string> </key>
+ <value> <string>A line was too long.</string> </value>
+ </item>
+ <item>
+ <key> <string>required_not_found</string> </key>
+ <value> <string>Input is required but no input given.</string> </value>
+ </item>
+ <item>
+ <key> <string>too_long</string> </key>
+ <value> <string>You entered too many characters.</string> </value>
+ </item>
+ <item>
+ <key> <string>too_many_lines</string> </key>
+ <value> <string>You entered too many lines.</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>overrides</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>height</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_linelength</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_lines</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>view_separator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>width</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>tales</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>height</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_linelength</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_lines</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>view_separator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>width</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>height</string> </key>
+ <value> <int>10</int> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_linelength</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_lines</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Paths of objects whose workflow histories should be kept</string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>view_separator</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+<br/>
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>width</string> </key>
+ <value> <int>80</int> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewInstallationDialog/listbox_choice.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewInstallationDialog/listbox_choice.xml?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewInstallationDialog/listbox_choice.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewInstallationDialog/listbox_choice.xml [utf8] Fri Jan 28 16:47:42 2011
@@ -253,7 +253,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:(cell.choice_item_list and cell.object_state != \'Removed but used\') and cell.choice_item_list[0][1] or []</string> </value>
+ <value> <string>python:(cell.choice_item_list and \' but \' not in cell.object_state) and cell.choice_item_list[0][1] or []</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getDetailedDiff.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getDetailedDiff.xml?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getDetailedDiff.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getDetailedDiff.xml [utf8] Fri Jan 28 16:47:42 2011
@@ -88,7 +88,7 @@ for diff_object in context.BusinessTempl
if link == 1: \n
print \'</a>\'\n
print \'</div>\'\n
- if diff_object.object_state == "Modified":\n
+ if diff_object.object_state.startswith(\'Modified\'):\n
request.set(\'bt1\', diff_object.bt1)\n
request.set(\'bt2\', diff_object.bt2)\n
request.set(\'object_id\', diff_object.object_id)\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getModifiedObjectList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getModifiedObjectList.xml?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getModifiedObjectList.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_getModifiedObjectList.xml [utf8] Fri Jan 28 16:47:42 2011
@@ -104,12 +104,12 @@ for bt in bt_id_list:\n
object_id = bt+\'|\'+object_id\n
line = newTempBase(context, \'tmp_install_%s\' % i)\n
\n
- if object_state == \'Modified\':\n
+ if object_state.startswith(\'Modified\'):\n
if object_class in no_backup_dict:\n
choice_item_list = [[upgrade_title, \'install\']]\n
else:\n
choice_item_list = [[backup_title, \'backup\']]\n
- elif object_state in (\'Removed\', \'Removed but used\'):\n
+ elif object_state.startswith(\'Removed\'):\n
if object_class in no_backup_dict:\n
choice_item_list = [[remove_title, \'remove\']]\n
else:\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_viewMultiInstallationDialog/listbox_choice.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_viewMultiInstallationDialog/listbox_choice.xml?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_viewMultiInstallationDialog/listbox_choice.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_viewMultiInstallationDialog/listbox_choice.xml [utf8] Fri Jan 28 16:47:42 2011
@@ -253,7 +253,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
- <value> <string>python:(cell.choice_item_list and cell.object_state != \'Removed but used\') and cell.choice_item_list[0][1] or []</string> </value>
+ <value> <string>python:(cell.choice_item_list and \' but \' not in cell.object_state) and cell.choice_item_list[0][1] or []</string> </value>
</item>
</dictionary>
</pickle>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log [utf8] Fri Jan 28 16:47:42 2011
@@ -1,3 +1,7 @@
+2011-01-28 Kazuhiko
+* support 'Paths of objects whose workflow history should be kept' and 'Paths of objects that should be kept' in Business Template definition.
+* support more 'Removed but ...' and 'Modified but ...' cases in business template installation dialogue.
+
2011-01-13 nicolas.dumazet
* add portal types for Tools bundled in erp5_core: Notification Tool was missing
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=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Fri Jan 28 16:47:42 2011
@@ -1 +1 @@
-40857
\ No newline at end of file
+40858
\ No newline at end of file
Modified: erp5/trunk/products/ERP5PropertySheetLegacy/PropertySheet/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5PropertySheetLegacy/PropertySheet/BusinessTemplate.py?rev=42752&r1=42751&r2=42752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5PropertySheetLegacy/PropertySheet/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5PropertySheetLegacy/PropertySheet/BusinessTemplate.py [utf8] Fri Jan 28 16:47:42 2011
@@ -211,6 +211,16 @@ class BusinessTemplate:
'type' : 'lines',
'mode' : 'w',
'default' : () },
+ { 'id' : 'template_keep_path',
+ 'description' : 'A list of object paths that should be kept in installing this template',
+ 'type' : 'lines',
+ 'mode' : 'w',
+ 'default' : () },
+ { 'id' : 'template_keep_workflow_path',
+ 'description' : 'A list of object paths whose workflow history should be kept in installing this template',
+ 'type' : 'lines',
+ 'mode' : 'w',
+ 'default' : () },
{ 'id' : 'template_preference',
'description' : 'A list of preferences used by this template',
'type' : 'lines',
More information about the Erp5-report
mailing list