[Erp5-report] r32475 ivan - in /erp5/trunk/bt5/erp5_dms: WorkflowTemplateItem/portal_workfl...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Feb 12 08:16:21 CET 2010


Author: ivan
Date: Fri Feb 12 08:16:20 2010
New Revision: 32475

URL: http://svn.erp5.org?rev=32475&view=rev
Log:
Add new interaction that will add contributor (logged in user) to edited document

Added:
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/interactions/Document_setContributor.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/Document_setContributor.xml
Modified:
    erp5/trunk/bt5/erp5_dms/bt/change_log
    erp5/trunk/bt5/erp5_dms/bt/revision

Added: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/interactions/Document_setContributor.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/interactions/Document_setContributor.xml?rev=32475&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/interactions/Document_setContributor.xml (added)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/interactions/Document_setContributor.xml [utf8] Fri Feb 12 08:16:20 2010
@@ -1,0 +1,103 @@
+<?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>
+              <list>
+                <string>Document_setContributor</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>after_script_name</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>before_commit_script_name</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>guard</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Document_setContributor</string> </value>
+        </item>
+        <item>
+            <key> <string>method_id</string> </key>
+            <value>
+              <list>
+                <string>edit</string>
+                <string>_edit</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>Drawing</string>
+                <string>File</string>
+                <string>Image</string>
+                <string>PDF</string>
+                <string>Presentation</string>
+                <string>Spreadsheet</string>
+                <string>Text</string>
+                <string>Web Page</string>
+              </list>
+            </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_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/Document_setContributor.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/Document_setContributor.xml?rev=32475&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/Document_setContributor.xml (added)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/Document_setContributor.xml [utf8] Fri Feb 12 08:16:20 2010
@@ -1,0 +1,146 @@
+<?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
+  Add contributor to document if logged in user has a respective ERP5\n
+  Person object.\n
+"""\n
+document = state_change[\'object\']\n
+contributor_list = document.getContributorValueList()\n
+person = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
+if person is not None and person not in contributor_list:\n
+  # a real ERP5 Person object does exist\n
+  contributor_list.append(person)\n
+  document.setContributorValueList(contributor_list)\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>document</string>
+                            <string>_getattr_</string>
+                            <string>contributor_list</string>
+                            <string>context</string>
+                            <string>person</string>
+                            <string>None</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>Document_setContributor</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_dms/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/bt/change_log?rev=32475&r1=32474&r2=32475&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/bt/change_log [utf8] Fri Feb 12 08:16:20 2010
@@ -1,3 +1,6 @@
+2010-02-12 ivan
+* Add new interaction that will add contributor (logged in user) to edited document
+
 2009-11-12 Kazuhiko
 * remove 'similar' base category because it is already included in erp5_web.
 

Modified: erp5/trunk/bt5/erp5_dms/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/bt/revision?rev=32475&r1=32474&r2=32475&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/bt/revision [utf8] Fri Feb 12 08:16:20 2010
@@ -1,1 +1,1 @@
-1061
+1062




More information about the Erp5-report mailing list