Export du workflow de commandes d'impressions.
authorBenoît Pin <pin@cri.ensmp.fr>
Tue, 15 Oct 2013 08:46:45 +0000 (10:46 +0200)
committerBenoît Pin <pin@cri.ensmp.fr>
Tue, 15 Oct 2013 08:46:45 +0000 (10:46 +0200)
profiles/photo/workflows.xml
profiles/photo/workflows/default_workflow/definition.xml
profiles/photo/workflows/folder_workflow/definition.xml
profiles/photo/workflows/member_workflow/definition.xml
profiles/photo/workflows/order_workflow/definition.xml
profiles/photo/workflows/portfolio_workflow/definition.xml

index cf8ec47..0620445 100644 (file)
@@ -21,6 +21,7 @@
   </type>
   <type type_id="Image Slot"/>
   <type type_id="List Slot"/>
   </type>
   <type type_id="Image Slot"/>
   <type type_id="List Slot"/>
+  <type type_id="Member Data"/>
   <type type_id="Order">
    <bound-workflow workflow_id="order_workflow"/>
   </type>
   <type type_id="Order">
    <bound-workflow workflow_id="order_workflow"/>
   </type>
index a8373a3..3300f09 100644 (file)
@@ -1,9 +1,8 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <dc-workflow workflow_id="default_workflow"
              title="Plinn default workflow" description=""
              state_variable="review_state"
 <dc-workflow workflow_id="default_workflow"
              title="Plinn default workflow" description=""
              state_variable="review_state"
-             initial_state="private" manager_bypass="0">
+             initial_state="private" manager_bypass="False">
  <permission>Access contents information</permission>
  <permission>Change portal events</permission>
  <permission>Change portal topics</permission>
  <permission>Access contents information</permission>
  <permission>Change portal events</permission>
  <permission>Change portal topics</permission>
              before_script="" after_script="">
   <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
   <action url="%(content_url)s/content_publish_form?direct:boolean=True"
              before_script="" after_script="">
   <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
   <action url="%(content_url)s/content_publish_form?direct:boolean=True"
-          category="workflow">Publish</action>
+          category="workflow" icon="">Publish</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
    <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
   <guard>
    <guard-permission>Review portal content</guard-permission>
    <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
              new_state="published" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_publish_form"
              new_state="published" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_publish_form"
-          category="workflow">Publish</action>
+          category="workflow" icon="">Publish</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_reject_form"
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_reject_form"
-          category="workflow">Reject</action>
+          category="workflow" icon="">Reject</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_retract_form"
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_retract_form"
-          category="workflow">Retract</action>
+          category="workflow" icon="">Retract</action>
   <guard>
    <guard-permission>Request review</guard-permission>
    <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
   <guard>
    <guard-permission>Request review</guard-permission>
    <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
              new_state="pending" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_submit_form"
              new_state="pending" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_submit_form"
-          category="workflow">Submit</action>
+          category="workflow" icon="">Submit</action>
   <guard>
    <guard-permission>Request review</guard-permission>
   </guard>
   <guard>
    <guard-permission>Request review</guard-permission>
   </guard>
  <worklist worklist_id="reviewer_queue" title="">
   <description>Reviewer tasks</description>
   <action url="%(portal_url)s/list_pending_contents"
  <worklist worklist_id="reviewer_queue" title="">
   <description>Reviewer tasks</description>
   <action url="%(portal_url)s/list_pending_contents"
-          category="global">Pending (%(count)d)</action>
+          category="global" icon="">Pending (%(count)d)</action>
   <guard>
    <guard-expression>here/havePendingContents</guard-expression>
   </guard>
   <guard>
    <guard-expression>here/havePendingContents</guard-expression>
   </guard>
index eff5a82..ab685f8 100644 (file)
@@ -1,9 +1,8 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <dc-workflow workflow_id="folder_workflow"
              title="Plinn folder workflow" description=""
              state_variable="review_state"
 <dc-workflow workflow_id="folder_workflow"
              title="Plinn folder workflow" description=""
              state_variable="review_state"
-             initial_state="private" manager_bypass="0">
+             initial_state="private" manager_bypass="False">
  <permission>Manage properties</permission>
  <permission>Modify portal content</permission>
  <permission>View</permission>
  <permission>Manage properties</permission>
  <permission>Modify portal content</permission>
  <permission>View</permission>
@@ -69,7 +68,7 @@
              before_script="" after_script="">
   <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
   <action url="%(content_url)s/content_publish_form?direct:boolean=True"
              before_script="" after_script="">
   <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
   <action url="%(content_url)s/content_publish_form?direct:boolean=True"
-          category="workflow">Publish</action>
+          category="workflow" icon="">Publish</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
    <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
   <guard>
    <guard-permission>Review portal content</guard-permission>
    <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
@@ -80,7 +79,7 @@
              new_state="published" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_publish_form"
              new_state="published" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_publish_form"
-          category="workflow">Publish</action>
+          category="workflow" icon="">Publish</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
@@ -90,7 +89,7 @@
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_reject_form"
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_reject_form"
-          category="workflow">Reject</action>
+          category="workflow" icon="">Reject</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_retract_form"
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_retract_form"
-          category="workflow">Retract</action>
+          category="workflow" icon="">Retract</action>
   <guard>
    <guard-permission>Request review</guard-permission>
    <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
   <guard>
    <guard-permission>Request review</guard-permission>
    <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
              new_state="pending" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_submit_form"
              new_state="pending" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_submit_form"
-          category="workflow">Submit</action>
+          category="workflow" icon="">Submit</action>
   <guard>
    <guard-permission>Request review</guard-permission>
   </guard>
   <guard>
    <guard-permission>Request review</guard-permission>
   </guard>
index bbde86b..a653b54 100644 (file)
@@ -1,9 +1,9 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <dc-workflow workflow_id="member_workflow"
              title="Plinn member registration workflow"
              description="" state_variable="review_state"
 <dc-workflow workflow_id="member_workflow"
              title="Plinn member registration workflow"
              description="" state_variable="review_state"
-             initial_state="m_initial" manager_bypass="0">
+             initial_state="m_initial"
+             manager_bypass="False">
  <state state_id="m_initial" title="">
   <exit-transition transition_id="create"/>
   <exit-transition transition_id="silent_register"/>
  <state state_id="m_initial" title="">
   <exit-transition transition_id="create"/>
   <exit-transition transition_id="silent_register"/>
@@ -58,7 +58,7 @@
  <worklist worklist_id="reviewer_queue" title="">
   <description>Reviewer tasks</description>
   <action url="%(portal_url)s/pending_members"
  <worklist worklist_id="reviewer_queue" title="">
   <description>Reviewer tasks</description>
   <action url="%(portal_url)s/pending_members"
-          category="global">Membres en attente (%(count)d)</action>
+          category="global" icon="">Membres en attente (%(count)d)</action>
   <guard>
    <guard-permission>Set Member Properties</guard-permission>
   </guard>
   <guard>
    <guard-permission>Set Member Properties</guard-permission>
   </guard>
index c72c600..c0e1b82 100644 (file)
@@ -1,8 +1,8 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <dc-workflow workflow_id="order_workflow"
              title="Order workflow" description=""
              state_variable="review_state"
 <dc-workflow workflow_id="order_workflow"
              title="Order workflow" description=""
              state_variable="review_state"
-             initial_state="recorded" manager_bypass="0">
+             initial_state="recorded" manager_bypass="False">
  <instance-creation-conditions>
    <guard>
     <guard-role>Authenticated</guard-role>
  <instance-creation-conditions>
    <guard>
     <guard-role>Authenticated</guard-role>
  </state>
  <state state_id="done" title="">
   <exit-transition transition_id="notify_sent"/>
  </state>
  <state state_id="done" title="">
   <exit-transition transition_id="notify_sent"/>
+  <permission-map name="Access contents information"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="paid" title="">
   <exit-transition transition_id="get_printing_list"/>
   <exit-transition transition_id="notify_done"/>
  </state>
  <state state_id="paid" title="">
   <exit-transition transition_id="get_printing_list"/>
   <exit-transition transition_id="notify_done"/>
+  <permission-map name="Access contents information"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="recorded" title="">
  </state>
  <state state_id="recorded" title="">
-  <exit-transition transition_id="auto_accept_payment"/>
-  <exit-transition transition_id="auto_cancel_order"/>
-  <exit-transition transition_id="auto_refuse_payment"/>
-  <exit-transition transition_id="auto_transaction_failed"/>
   <exit-transition transition_id="cancel"/>
   <exit-transition transition_id="manual_payment"/>
   <exit-transition transition_id="cancel"/>
   <exit-transition transition_id="manual_payment"/>
+  <exit-transition transition_id="paypal_pay"/>
   <permission-map name="Access contents information"
                   acquired="False">
    <permission-role>Manager</permission-role>
   <permission-map name="Access contents information"
                   acquired="False">
    <permission-role>Manager</permission-role>
   </permission-map>
  </state>
  <state state_id="refused" title="">
   </permission-map>
  </state>
  <state state_id="refused" title="">
+  <permission-map name="Access contents information"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  <state state_id="sent" title="">
  </state>
  <state state_id="sent" title="">
+  <permission-map name="Access contents information"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="Delete Owned Objects"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Manage properties" acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>Owner</permission-role>
+  </permission-map>
  </state>
  </state>
- <transition transition_id="auto_accept_payment"
-             title="Accept payment" new_state="paid"
-             trigger="USER" before_script="" after_script="">
-  <description>Payment accepted by the bank</description>
-  
-  <guard>
-   <guard-expression>nothing</guard-expression>
-  </guard>
- </transition>
- <transition transition_id="auto_cancel_order"
-             title="Cancel order" new_state=""
-             trigger="USER" before_script="" after_script="">
-  <description>The customer has canceled the order from payement site.</description>
-  
-  <guard>
-   <guard-expression>nothing</guard-expression>
-  </guard>
- </transition>
- <transition transition_id="auto_refuse_payment"
-             title="Refuse payment" new_state="refused"
-             trigger="USER" before_script="" after_script="">
-  <description>Payment refused by the bank.</description>
-  
-  <guard>
-   <guard-expression>nothing</guard-expression>
-  </guard>
- </transition>
- <transition transition_id="auto_transaction_failed"
-             title="" new_state="" trigger="USER"
-             before_script="" after_script="">
-  
-  <guard>
-   <guard-expression>nothing</guard-expression>
-  </guard>
- </transition>
  <transition transition_id="cancel" title=""
              new_state="canceled" trigger="USER"
              before_script="" after_script="relistCopies">
   <action url="%(content_url)s/order_cancel_form"
  <transition transition_id="cancel" title=""
              new_state="canceled" trigger="USER"
              before_script="" after_script="relistCopies">
   <action url="%(content_url)s/order_cancel_form"
-          category="workflow">Cancel</action>
+          category="workflow" icon="">Cancel</action>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
              new_state="" trigger="USER" before_script=""
              after_script="">
   <action url="%(object_url)s/order_printing_list"
              new_state="" trigger="USER" before_script=""
              after_script="">
   <action url="%(object_url)s/order_printing_list"
-          category="workflow">Printing list</action>
+          category="workflow" icon="">Printing list</action>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
              new_state="paid" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/order_manual_payment_form"
              new_state="paid" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/order_manual_payment_form"
-          category="workflow">Manual payment</action>
+          category="workflow" icon="">Manual payment</action>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
              new_state="done" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/order_notify_done_form"
              new_state="done" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/order_notify_done_form"
-          category="workflow">Notify done</action>
+          category="workflow" icon="">Notify done</action>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
              new_state="sent" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/order_notify_sent_form"
              new_state="sent" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/order_notify_sent_form"
-          category="workflow">Notify sent</action>
+          category="workflow" icon="">Notify sent</action>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
  </transition>
   <guard>
    <guard-permission>Manage print orders</guard-permission>
   </guard>
  </transition>
+ <transition transition_id="paypal_pay" title=""
+             new_state="paid" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Owner</guard-role>
+  </guard>
+ </transition>
  <variable variable_id="action" for_catalog="False"
            for_status="True" update_always="True">
   <description>The last transition</description>
  <variable variable_id="action" for_catalog="False"
            for_status="True" update_always="True">
   <description>The last transition</description>
index 81ca24e..951ad1c 100644 (file)
@@ -1,9 +1,8 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <dc-workflow workflow_id="portfolio_workflow"
              title="Plinn folder workflow" description=""
              state_variable="review_state"
 <dc-workflow workflow_id="portfolio_workflow"
              title="Plinn folder workflow" description=""
              state_variable="review_state"
-             initial_state="private" manager_bypass="0">
+             initial_state="private" manager_bypass="False">
  <permission>Add portal content</permission>
  <permission>Change Images and Files</permission>
  <permission>Delete Owned Objects</permission>
  <permission>Add portal content</permission>
  <permission>Change Images and Files</permission>
  <permission>Delete Owned Objects</permission>
              before_script="" after_script="">
   <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
   <action url="%(content_url)s/content_publish_form?direct:boolean=True"
              before_script="" after_script="">
   <description>Reviewer can directly publish content  if he have de Owner role (not necessarily ownership)</description>
   <action url="%(content_url)s/content_publish_form?direct:boolean=True"
-          category="workflow">Publish</action>
+          category="workflow" icon="">Publish</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
    <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
   <guard>
    <guard-permission>Review portal content</guard-permission>
    <guard-expression>python:user.allowed(here, ['Owner'])</guard-expression>
              new_state="published" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_publish_form"
              new_state="published" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_publish_form"
-          category="workflow">Publish</action>
+          category="workflow" icon="">Publish</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_reject_form"
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_reject_form"
-          category="workflow">Reject</action>
+          category="workflow" icon="">Reject</action>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
   <guard>
    <guard-permission>Review portal content</guard-permission>
   </guard>
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_retract_form"
              new_state="private" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_retract_form"
-          category="workflow">Retract</action>
+          category="workflow" icon="">Retract</action>
   <guard>
    <guard-permission>Request review</guard-permission>
    <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
   <guard>
    <guard-permission>Request review</guard-permission>
    <guard-expression>python:not(here.portal_membership.checkPermission('Review portal content', here))</guard-expression>
              new_state="pending" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_submit_form"
              new_state="pending" trigger="USER"
              before_script="" after_script="">
   <action url="%(content_url)s/content_submit_form"
-          category="workflow">Submit</action>
+          category="workflow" icon="">Submit</action>
   <guard>
    <guard-permission>Request review</guard-permission>
   </guard>
   <guard>
    <guard-permission>Request review</guard-permission>
   </guard>