Commit 1aaa404c authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5:

* create trade condition which could be applied to subscribe to a virtual master
* local roles of Subscription Request
* subscription request interaction workflow
* do not allow Sale function to modify Subscription Request
  Let's automate everything for now
parent 1e9f8b4f
......@@ -7,7 +7,7 @@
</role>
<role id='Auditor'>
<property id='title'>Destination Member</property>
<property id='condition'>python: context.getDestination('', portal_type='Person') != ""
<property id='condition'>python: (context.getValidationState() == 'validated') and (context.getDestination('', portal_type='Person') != "")
</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
<multi_property id='categories'>local_role_group/user</multi_property>
......@@ -15,12 +15,20 @@
</role>
<role id='Auditor'>
<property id='title'>Destination Project Member</property>
<property id='condition'>python: context.getDestinationProject('', portal_type='Project') != ""
<property id='condition'>python: (context.getValidationState() == 'validated') and (context.getDestination('') == "") and (context.getDestinationProject('') != "")
</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
<multi_property id='categories'>local_role_group/project</multi_property>
<multi_property id='base_category'>destination_project</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Global for all Customers</property>
<property id='condition'>python: (context.getValidationState() == 'validated') and (context.getDestination('') == "") and (context.getDestinationProject('') == "")
</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/customer</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Person Shadow</property>
<multi_property id='categories'>local_role_group/shadow</multi_property>
......
<type_roles>
<role id='Auditor'>
<property id='title'>Sale Agent</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/sale/agent</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Sale Manager</property>
<multi_property id='categories'>local_role_group/function</multi_property>
<multi_property id='category'>function/sale/manager</multi_property>
<multi_property id='base_category'>function</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Source Member</property>
<property id='condition'>python: context.getSource('', portal_type='Person') != ""
</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
<multi_property id='categories'>local_role_group/user</multi_property>
<multi_property id='base_category'>source</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -175,6 +175,10 @@
<type>Software Product</type>
<workflow>local_permission_slapos_interaction_workflow</workflow>
</chain>
<chain>
<type>Subscription Request</type>
<workflow>local_permission_slapos_interaction_workflow</workflow>
</chain>
<chain>
<type>Support Request</type>
<workflow>local_permission_slapos_interaction_workflow</workflow>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interaction Workflow Interaction" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>after_script/portal_workflow/local_permission_slapos_interaction_workflow/script_Base_updateAllLocalRoles</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interaction_SubscriptionRequest_edit</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interaction Workflow Interaction</string> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<tuple>
<string>Subscription Request</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type_group_filter</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>trigger_method_id</string> </key>
<value>
<tuple>
<string>_setSource.*</string>
</tuple>
</value>
</item>
<item>
<key> <string>trigger_once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -47,6 +47,7 @@ Slave Instance | local_permission_slapos_interaction_workflow
Software Installation | local_permission_slapos_interaction_workflow
Software Instance | local_permission_slapos_interaction_workflow
Software Product | local_permission_slapos_interaction_workflow
Subscription Request | local_permission_slapos_interaction_workflow
Support Request | local_permission_slapos_interaction_workflow
Upgrade Decision | local_permission_slapos_interaction_workflow
Web Message | local_permission_slapos_interaction_workflow
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment