[Erp5-report] r20349 - in /erp5/trunk/bt5/erp5_trade: WorkflowTemplateItem/portal_workflow/...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Apr 8 15:00:01 CEST 2008


Author: vincent
Date: Tue Apr  8 15:00:00 2008
New Revision: 20349

URL: http://svn.erp5.org?rev=20349&view=rev
Log:
Use new forms allowing user to specify a start_date when executing "start" transition, and a stop_date when executing "stop" transition.
Add a script to set those values on document whose state is being modified.

Added:
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_edit.xml
Modified:
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/start_action.xml
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/stop_action.xml
    erp5/trunk/bt5/erp5_trade/bt/revision

Added: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_edit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_edit.xml?rev=20349&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_edit.xml (added)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_edit.xml Tue Apr  8 15:00:00 2008
@@ -1,0 +1,161 @@
+<?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>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </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># Set all properties received from workflow transition form, except:\n
+#  - comment\n
+#  - workflow_action\n
+# because they are workflow-level fields, not document-level.\n
+# Required values must be set as required fields at transition form level,\n
+# and must not be enforced here.\n
+\n
+for skipped in (\'comment\', \'workflow_action\'):\n
+  if skipped in kw:\n
+    del kw[skipped]\n
+\n
+if len(kw):\n
+  document = state_change[\'object\']\n
+  document.edit(**kw)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>state_change, **kw</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>state_change</string>
+                            <string>kw</string>
+                            <string>_getiter_</string>
+                            <string>skipped</string>
+                            <string>_write_</string>
+                            <string>len</string>
+                            <string>_getitem_</string>
+                            <string>document</string>
+                            <string>_apply_</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>PackingList_edit</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/start_action.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/start_action.xml?rev=20349&r1=20348&r2=20349&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/start_action.xml (original)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/start_action.xml Tue Apr  8 15:00:00 2008
@@ -25,7 +25,7 @@
         </item>
         <item>
             <key> <string>actbox_url</string> </key>
-            <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=start_action</string> </value>
+            <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowStartActionDialog?workflow_action=start_action</string> </value>
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
@@ -51,7 +51,7 @@
         </item>
         <item>
             <key> <string>script_name</string> </key>
-            <value> <string></string> </value>
+            <value> <string>PackingList_edit</string> </value>
         </item>
         <item>
             <key> <string>title</string> </key>

Modified: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/stop_action.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/stop_action.xml?rev=20349&r1=20348&r2=20349&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/stop_action.xml (original)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/transitions/stop_action.xml Tue Apr  8 15:00:00 2008
@@ -25,7 +25,7 @@
         </item>
         <item>
             <key> <string>actbox_url</string> </key>
-            <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=stop_action</string> </value>
+            <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowStopActionDialog?workflow_action=stop_action</string> </value>
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
@@ -51,7 +51,7 @@
         </item>
         <item>
             <key> <string>script_name</string> </key>
-            <value> <string></string> </value>
+            <value> <string>PackingList_edit</string> </value>
         </item>
         <item>
             <key> <string>title</string> </key>

Modified: erp5/trunk/bt5/erp5_trade/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/bt/revision?rev=20349&r1=20348&r2=20349&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/bt/revision (original)
+++ erp5/trunk/bt5/erp5_trade/bt/revision Tue Apr  8 15:00:00 2008
@@ -1,1 +1,1 @@
-214
+215




More information about the Erp5-report mailing list