[Erp5-report] r36576 fabien - in /experimental/bt5/erp5_credential: ActionTemplateItem/port...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jun 24 16:56:58 CEST 2010
Author: fabien
Date: Thu Jun 24 16:56:56 2010
New Revision: 36576
URL: http://svn.erp5.org?rev=36576&view=rev
Log:
Don't manage automatic transition using preference. This is now managed by adding or removing the interaction workflow credential_update_automatic_approve on the Credential Portal Types. This mean that each project that need this automatic transition should define explicitly this workflow on the credential Portal Type.
This makes the preference useless, so remove it.
Removed:
experimental/bt5/erp5_credential/ActionTemplateItem/portal_types/System%20Preference/
experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialPreference.py
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential/
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential.xml
experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_request_automatic_approve.xml
experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_automatic_approve.xml
experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_approve.xml
Removed: experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialPreference.py
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialPreference.py?rev=36575&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialPreference.py [utf8] (original)
+++ experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialPreference.py (removed)
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-#############################################################################
-#
-# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
-# Fabien MORIN <fabien at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# garantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-from Products.ERP5Type import Permissions
-
-class CredentialPreference:
- """
- This property sheet defines the user configurable taxonomy.
- """
-
- _properties = (
- { 'id' : 'preferred_automatic_approve_credential_request',
- 'description' : 'If it\'s checked, the approve transition will be '\
- 'automatcally passed once the Credential Request is'\
- ' submitted without human review',
- 'type' : 'boolean',
- 'write_permission': Permissions.ManageProperties,
- 'default' : False,
- 'preference' : 1,
- 'mode' : '' },
- { 'id' : 'preferred_automatic_approve_credential_update',
- 'description' : 'If it\'s checked, the approve transition will be '\
- 'automatcally passed once the Credential Update is'\
- ' submitted without human review',
- 'type' : 'boolean',
- 'write_permission': Permissions.ManageProperties,
- 'default' : False,
- 'preference' : 1,
- 'mode' : '' },
- )
-
-# vim: shiftwidth=2
-
Removed: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential.xml?rev=36575&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/SystemPreference_viewCredential.xml (removed)
@@ -1,156 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
- <record id="1" aka="AAAAAAAAAAE=">
- <pickle>
- <tuple>
- <global name="ERP5Form" module="Products.ERP5Form.Form"/>
- <tuple/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <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/>
- </value>
- </item>
- </dictionary>
- </state>
- </object>
- </value>
- </item>
- <item>
- <key> <string>_objects</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>action</string> </key>
- <value> <string>Base_edit</string> </value>
- </item>
- <item>
- <key> <string>description</string> </key>
- <value> <string></string> </value>
- </item>
- <item>
- <key> <string>edit_order</string> </key>
- <value>
- <list/>
- </value>
- </item>
- <item>
- <key> <string>encoding</string> </key>
- <value> <string>UTF-8</string> </value>
- </item>
- <item>
- <key> <string>enctype</string> </key>
- <value> <string>multipart/form-data</string> </value>
- </item>
- <item>
- <key> <string>group_list</string> </key>
- <value>
- <list>
- <string>left</string>
- <string>right</string>
- <string>center</string>
- <string>bottom</string>
- <string>hidden</string>
- </list>
- </value>
- </item>
- <item>
- <key> <string>groups</string> </key>
- <value>
- <dictionary>
- <item>
- <key> <string>bottom</string> </key>
- <value>
- <list/>
- </value>
- </item>
- <item>
- <key> <string>center</string> </key>
- <value>
- <list/>
- </value>
- </item>
- <item>
- <key> <string>hidden</string> </key>
- <value>
- <list/>
- </value>
- </item>
- <item>
- <key> <string>left</string> </key>
- <value>
- <list>
- <string>my_preferred_automatic_approve_credential_request</string>
- <string>my_preferred_automatic_approve_credential_update</string>
- </list>
- </value>
- </item>
- <item>
- <key> <string>right</string> </key>
- <value>
- <list/>
- </value>
- </item>
- </dictionary>
- </value>
- </item>
- <item>
- <key> <string>id</string> </key>
- <value> <string>SystemPreference_viewCredential</string> </value>
- </item>
- <item>
- <key> <string>method</string> </key>
- <value> <string>POST</string> </value>
- </item>
- <item>
- <key> <string>name</string> </key>
- <value> <string>SystemPreference_viewCredential</string> </value>
- </item>
- <item>
- <key> <string>pt</string> </key>
- <value> <string>form_view</string> </value>
- </item>
- <item>
- <key> <string>row_length</string> </key>
- <value> <int>4</int> </value>
- </item>
- <item>
- <key> <string>stored_encoding</string> </key>
- <value> <string>UTF-8</string> </value>
- </item>
- <item>
- <key> <string>title</string> </key>
- <value> <string>Credential Preferences</string> </value>
- </item>
- <item>
- <key> <string>unicode_mode</string> </key>
- <value> <int>0</int> </value>
- </item>
- <item>
- <key> <string>update_action</string> </key>
- <value> <string></string> </value>
- </item>
- <item>
- <key> <string>update_action_title</string> </key>
- <value> <string></string> </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
Removed: experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_request_automatic_approve.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_request_automatic_approve.xml?rev=36575&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_request_automatic_approve.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_request_automatic_approve.xml (removed)
@@ -1,129 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
- <record id="1" aka="AAAAAAAAAAE=">
- <pickle>
- <tuple>
- <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
- <tuple/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <item>
- <key> <string>actbox_category</string> </key>
- <value> <string>workflow</string> </value>
- </item>
- <item>
- <key> <string>actbox_name</string> </key>
- <value> <string></string> </value>
- </item>
- <item>
- <key> <string>actbox_url</string> </key>
- <value> <string></string> </value>
- </item>
- <item>
- <key> <string>activate_script_name</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>after_script_name</string> </key>
- <value>
- <list>
- <string>Credential_approve</string>
- </list>
- </value>
- </item>
- <item>
- <key> <string>before_commit_script_name</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>description</string> </key>
- <value> <string>If the related system preference property is checked, approve transition will be automatically called after submit without any human review. If the preference property is not checked, this mean that a review and manual transition change is needed.</string> </value>
- </item>
- <item>
- <key> <string>guard</string> </key>
- <value>
- <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
- </value>
- </item>
- <item>
- <key> <string>id</string> </key>
- <value> <string>credential_request_automatic_approve</string> </value>
- </item>
- <item>
- <key> <string>method_id</string> </key>
- <value>
- <list>
- <string>submit</string>
- </list>
- </value>
- </item>
- <item>
- <key> <string>once_per_transaction</string> </key>
- <value> <int>0</int> </value>
- </item>
- <item>
- <key> <string>portal_type_filter</string> </key>
- <value>
- <list>
- <string>Credential Request</string>
- </list>
- </value>
- </item>
- <item>
- <key> <string>script_name</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>title</string> </key>
- <value> <string>Approve Credential Request Automatically </string> </value>
- </item>
- <item>
- <key> <string>trigger_type</string> </key>
- <value> <int>2</int> </value>
- </item>
- </dictionary>
- </pickle>
- </record>
- <record id="2" aka="AAAAAAAAAAI=">
- <pickle>
- <tuple>
- <global name="Guard" module="Products.DCWorkflow.Guard"/>
- <tuple/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <item>
- <key> <string>expr</string> </key>
- <value>
- <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
- <record id="3" aka="AAAAAAAAAAM=">
- <pickle>
- <tuple>
- <global name="Expression" module="Products.CMFCore.Expression"/>
- <tuple/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <item>
- <key> <string>text</string> </key>
- <value> <string>python: here.getPortalObject().portal_preferences.isPreferredAutomaticApproveCredentialRequest(False)</string> </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
Removed: experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_automatic_approve.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_automatic_approve.xml?rev=36575&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_automatic_approve.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/interactions/credential_update_automatic_approve.xml (removed)
@@ -1,129 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
- <record id="1" aka="AAAAAAAAAAE=">
- <pickle>
- <tuple>
- <global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
- <tuple/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <item>
- <key> <string>actbox_category</string> </key>
- <value> <string>workflow</string> </value>
- </item>
- <item>
- <key> <string>actbox_name</string> </key>
- <value> <string></string> </value>
- </item>
- <item>
- <key> <string>actbox_url</string> </key>
- <value> <string></string> </value>
- </item>
- <item>
- <key> <string>activate_script_name</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>after_script_name</string> </key>
- <value>
- <list>
- <string>Credential_approve</string>
- </list>
- </value>
- </item>
- <item>
- <key> <string>before_commit_script_name</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>description</string> </key>
- <value> <string>If the related system preference property is checked, approve transition will be automatically called after submit without any human review. If the preference property is not checked, this mean that a review and manual transition change is needed.</string> </value>
- </item>
- <item>
- <key> <string>guard</string> </key>
- <value>
- <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
- </value>
- </item>
- <item>
- <key> <string>id</string> </key>
- <value> <string>credential_update_automatic_approve</string> </value>
- </item>
- <item>
- <key> <string>method_id</string> </key>
- <value>
- <list>
- <string>submit</string>
- </list>
- </value>
- </item>
- <item>
- <key> <string>once_per_transaction</string> </key>
- <value> <int>0</int> </value>
- </item>
- <item>
- <key> <string>portal_type_filter</string> </key>
- <value>
- <list>
- <string>Credential Update</string>
- </list>
- </value>
- </item>
- <item>
- <key> <string>script_name</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>title</string> </key>
- <value> <string>Approve Credential Update Automatically</string> </value>
- </item>
- <item>
- <key> <string>trigger_type</string> </key>
- <value> <int>2</int> </value>
- </item>
- </dictionary>
- </pickle>
- </record>
- <record id="2" aka="AAAAAAAAAAI=">
- <pickle>
- <tuple>
- <global name="Guard" module="Products.DCWorkflow.Guard"/>
- <tuple/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <item>
- <key> <string>expr</string> </key>
- <value>
- <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
- <record id="3" aka="AAAAAAAAAAM=">
- <pickle>
- <tuple>
- <global name="Expression" module="Products.CMFCore.Expression"/>
- <tuple/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <item>
- <key> <string>text</string> </key>
- <value> <string>python: here.getPortalObject().portal_preferences.isPreferredAutomaticApproveCredentialUpdate(False)</string> </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
Removed: experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_approve.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_approve.xml?rev=36575&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_approve.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_interaction_workflow/scripts/Credential_approve.xml (removed)
@@ -1,143 +0,0 @@
-<?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>Script_magic</string> </key>
- <value> <int>3</int> </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>"""\n
- This script is used to automatically approve a submitted credential object.\n
- The interaction use a system preference to call this script or not.\n
-"""\n
-\n
-credential_object = state_change[\'object\']\n
-if credential_object.getValidationState() == \'submitted\':\n
- credential_object.approve()\n
-</string> </value>
- </item>
- <item>
- <key> <string>_code</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>_params</string> </key>
- <value> <string>state_change</string> </value>
- </item>
- <item>
- <key> <string>_proxy_roles</string> </key>
- <value>
- <tuple>
- <string>Manager</string>
- </tuple>
- </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>1</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>state_change</string>
- <string>_getitem_</string>
- <string>credential_object</string>
- <string>_getattr_</string>
- </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>Credential_approve</string> </value>
- </item>
- <item>
- <key> <string>title</string> </key>
- <value> <string>This script use Proxy Role(Manager)</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
More information about the Erp5-report
mailing list