[Erp5-report] r35107 jerome - in /erp5/trunk/bt5/erp5_base: SkinTemplateItem/portal_skins/e...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri May 7 14:14:55 CEST 2010
Author: jerome
Date: Fri May 7 14:14:53 2010
New Revision: 35107
URL: http://svn.erp5.org?rev=35107&view=rev
Log:
create a preference for new users
Added:
erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_createUserPreference.xml
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/interactions/setReference.xml
erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/scripts/Person_createUserPreference.xml
Modified:
erp5/trunk/bt5/erp5_base/bt/revision
Added: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_createUserPreference.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_createUserPreference.xml?rev=35107&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_createUserPreference.xml (added)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_createUserPreference.xml [utf8] Fri May 7 14:14:53 2010
@@ -1,0 +1,162 @@
+<?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>if REQUEST is not None:\n
+ from AccessControl import Unauthorized\n
+ raise Unauthorized(script.getId())\n
+\n
+from Products.ERP5Type.Message import translateString\n
+preference = context.getPortalObject().portal_preferences.createPreferenceForUser(\n
+ context.getReference())\n
+\n
+preference.setTitle(translateString(\'Preference for ${name}\',\n
+ mapping=dict(name=context.getTitle())))\n
+\n
+for assignment in context.contentValues(portal_type=\'Assignment\'):\n
+ group = assignment.getGroup(base=True)\n
+ if group:\n
+ preference.setPreferredSectionCategory(group)\n
+ preference.setPreferredAccountingTransactionSectionCategory(group)\n
+\n
+preference.enable()\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>REQUEST=None</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>REQUEST</string>
+ <string>None</string>
+ <string>AccessControl</string>
+ <string>Unauthorized</string>
+ <string>_getattr_</string>
+ <string>script</string>
+ <string>Products.ERP5Type.Message</string>
+ <string>translateString</string>
+ <string>context</string>
+ <string>preference</string>
+ <string>dict</string>
+ <string>_getiter_</string>
+ <string>assignment</string>
+ <string>True</string>
+ <string>group</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <tuple>
+ <none/>
+ </tuple>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>Person_createUserPreference</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/interactions/setReference.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/interactions/setReference.xml?rev=35107&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/interactions/setReference.xml (added)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/interactions/setReference.xml [utf8] Fri May 7 14:14:53 2010
@@ -1,0 +1,93 @@
+<?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>Person_createUserPreference</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>set a login</string> </value>
+ </item>
+ <item>
+ <key> <string>guard</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>setReference</string> </value>
+ </item>
+ <item>
+ <key> <string>method_id</string> </key>
+ <value>
+ <list>
+ <string>_setReference</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>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>script_name</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>trigger_type</string> </key>
+ <value> <int>2</int> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/scripts/Person_createUserPreference.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/scripts/Person_createUserPreference.xml?rev=35107&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/scripts/Person_createUserPreference.xml (added)
+++ erp5/trunk/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/person_interaction_workflow/scripts/Person_createUserPreference.xml [utf8] Fri May 7 14:14:53 2010
@@ -1,0 +1,128 @@
+<?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>person = sci[\'object\']\n
+if sci[\'object\'].getReference():\n
+ person.activate(after_path_and_method_id=(person.getPath(),\n
+ (\'immediateReindexObject\',\n
+ \'recursiveImmediateReindexObject\'))).Person_createUserPreference()\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>sci</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>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>sci</string>
+ <string>_getitem_</string>
+ <string>person</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>Person_createUserPreference</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=35107&r1=35106&r2=35107&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision [utf8] Fri May 7 14:14:53 2010
@@ -1,1 +1,1 @@
-729
+730
More information about the Erp5-report
mailing list