Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amrani
erp5
Commits
145a3397
Commit
145a3397
authored
Jun 18, 2015
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_free_subscription: Provide reference for FSR, give role to user
parent
ff00ac85
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
349 additions
and
2 deletions
+349
-2
bt5/erp5_free_subscription/CategoryTemplateItem/portal_categories/product_line/subscription.xml
...plateItem/portal_categories/product_line/subscription.xml
+89
-0
bt5/erp5_free_subscription/CategoryTemplateItem/portal_categories/role/newsletter_subscriber.xml
...lateItem/portal_categories/role/newsletter_subscriber.xml
+89
-0
bt5/erp5_free_subscription/CategoryTemplateItem/portal_categories/use/crm/free_subscription.xml
...plateItem/portal_categories/use/crm/free_subscription.xml
+89
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_generateReference.xml
...ubscription/FreeSubscriptionRequest_generateReference.xml
+2
-0
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/interactions/automatic_accept_request.xml
...action_workflow/interactions/automatic_accept_request.xml
+1
-0
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/scripts/FreeSubscriptionRequest_updateReference.xml
...kflow/scripts/FreeSubscriptionRequest_updateReference.xml
+69
-0
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/scripts/Request_updateFreeSubscription.xml
...ction_workflow/scripts/Request_updateFreeSubscription.xml
+6
-1
bt5/erp5_free_subscription/bt/template_base_category_list
bt5/erp5_free_subscription/bt/template_base_category_list
+4
-1
No files found.
bt5/erp5_free_subscription/CategoryTemplateItem/portal_categories/product_line/subscription.xml
0 → 100644
View file @
145a3397
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
product_line/subscription
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
subscription
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<string>
Subscription
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Subscription
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_free_subscription/CategoryTemplateItem/portal_categories/role/newsletter_subscriber.xml
0 → 100644
View file @
145a3397
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
role/newsletter_subscriber
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
codification
</string>
</key>
<value>
<string>
NEWSSUB
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
newsletter_subscriber
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Newsletter subscriber
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_free_subscription/CategoryTemplateItem/portal_categories/use/crm/free_subscription.xml
0 → 100644
View file @
145a3397
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
use/crm/free_subscription
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
free_subscription
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<string>
Free Subscription
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Free Subscription
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_generateReference.xml
View file @
145a3397
...
@@ -62,6 +62,8 @@ if context.getSource():\n
...
@@ -62,6 +62,8 @@ if context.getSource():\n
\n
\n
source_reference = \'%s-%s-%05d\' % (reference_base, group_reference, counter)\n
source_reference = \'%s-%s-%05d\' % (reference_base, group_reference, counter)\n
context.setReference(source_reference)\n
context.setReference(source_reference)\n
if not context.getTitle():\n
context.setTitle(source_reference)\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/interactions/automatic_accept_request.xml
View file @
145a3397
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
<value>
<value>
<list>
<list>
<string>
Call_alarmActiveSense
</string>
<string>
Call_alarmActiveSense
</string>
<string>
FreeSubscriptionRequest_updateReference
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/scripts/FreeSubscriptionRequest_updateReference.xml
0 → 100644
View file @
145a3397
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</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>
free_subscription_request = state_change["object"]\n
\n
free_subscription_request.FreeSubscriptionRequest_generateReference()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
FreeSubscriptionRequest_updateReference
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/scripts/Request_updateFreeSubscription.xml
View file @
145a3397
...
@@ -59,13 +59,18 @@ if request.getFreeSubscriptionRequestType() == "unsubscription":\n
...
@@ -59,13 +59,18 @@ if request.getFreeSubscriptionRequestType() == "unsubscription":\n
elif request.getFreeSubscriptionRequestType() == "subscription":\n
elif request.getFreeSubscriptionRequestType() == "subscription":\n
from DateTime import DateTime\n
from DateTime import DateTime\n
portal = request.getPortalObject()\n
portal = request.getPortalObject()\n
destination_value = request.getDestinationValue()\n
free_subscription = portal.free_subscription_module.newContent(\n
free_subscription = portal.free_subscription_module.newContent(\n
source=request.getSource(),\n
source=request.getSource(),\n
destination
=request.getDestination()
,\n
destination
_value=destination_value
,\n
resource=request.getResource(),\n
resource=request.getResource(),\n
effective_date=DateTime())\n
effective_date=DateTime())\n
free_subscription.validate()\n
free_subscription.validate()\n
request.setFollowUpValue(free_subscription)\n
request.setFollowUpValue(free_subscription)\n
career_role_list = destination_value.getCareerRoleList([])\n
if not any([x.split("/")[0] == "newsletter_subscriber" for x in career_role_list]):\n
career_role_list.append(\'newsletter_subscriber\')\n
destination_value.setCareerRoleList(career_role_list)\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
bt5/erp5_free_subscription/bt/template_base_category_list
View file @
145a3397
free_subscription_request_type
free_subscription_request_type
product_line/subscription
role/newsletter_subscriber
use/crm/free_subscription
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment