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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vivek
erp5
Commits
86279fcd
Commit
86279fcd
authored
Sep 17, 2015
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_free_subscription: Merge EOS work
* Add subscribe for Free Subscription Requests * Various improvments
parent
e0c95b82
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
822 additions
and
49 deletions
+822
-49
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/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+3
-0
bt5/erp5_free_subscription/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+1
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription.xml
.../SkinTemplateItem/portal_skins/erp5_free_subscription.xml
+21
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/Base_createFreeSubscriptionRequest.xml
..._free_subscription/Base_createFreeSubscriptionRequest.xml
+36
-24
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/Base_unsubscribeFromEvent.xml
...kins/erp5_free_subscription/Base_unsubscribeFromEvent.xml
+14
-17
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/Entity_createFreeSubscription.xml
.../erp5_free_subscription/Entity_createFreeSubscription.xml
+1
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequestModule_viewFreeSubscriptionRequestList/listbox.xml
...RequestModule_viewFreeSubscriptionRequestList/listbox.xml
+16
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_accept.xml
...erp5_free_subscription/FreeSubscriptionRequest_accept.xml
+35
-1
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_generateReference.xml
...ubscription/FreeSubscriptionRequest_generateReference.xml
+2
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_view.xml
...s/erp5_free_subscription/FreeSubscriptionRequest_view.xml
+2
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_view/my_causality_title.xml
...ption/FreeSubscriptionRequest_view/my_causality_title.xml
+5
-1
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_view/my_default_email_coordinate_text.xml
...criptionRequest_view/my_default_email_coordinate_text.xml
+115
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_view/my_default_email_url_string.xml
...eSubscriptionRequest_view/my_default_email_url_string.xml
+115
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscription_generateReference.xml
..._free_subscription/FreeSubscription_generateReference.xml
+2
-0
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/NotificationMessage_getSubstitutionMappingDictFromEvent.xml
...tificationMessage_getSubstitutionMappingDictFromEvent.xml
+2
-3
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/interactions/validate_free_subscription.xml
...tion_workflow/interactions/validate_free_subscription.xml
+102
-0
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/scripts/FreeSubscription_updateReference.xml
...ion_workflow/scripts/FreeSubscription_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
bt5/erp5_free_subscription/bt/template_portal_type_allowed_content_type_list
...ription/bt/template_portal_type_allowed_content_type_list
+2
-1
bt5/erp5_free_subscription/bt/template_portal_type_property_sheet_list
..._subscription/bt/template_portal_type_property_sheet_list
+2
-0
No files found.
bt5/erp5_free_subscription/CategoryTemplateItem/portal_categories/product_line/subscription.xml
0 → 100644
View file @
86279fcd
<?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 @
86279fcd
<?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 @
86279fcd
<?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/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
86279fcd
...
...
@@ -2,6 +2,9 @@
<portal_type
id=
"Free Subscription Module"
>
<item>
Free Subscription
</item>
</portal_type>
<portal_type
id=
"Free Subscription Request"
>
<item>
Email
</item>
</portal_type>
<portal_type
id=
"Free Subscription Request Module"
>
<item>
Free Subscription Request
</item>
</portal_type>
...
...
bt5/erp5_free_subscription/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
86279fcd
...
...
@@ -6,6 +6,7 @@
<portal_type
id=
"Free Subscription Request"
>
<item>
Arrow
</item>
<item>
DublinCore
</item>
<item>
Person
</item>
<item>
Reference
</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription.xml
View file @
86279fcd
...
...
@@ -6,12 +6,33 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
business_template_skin_layer_priority
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
float
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
business_template_skin_layer_priority
</string>
</key>
<value>
<float>
50.0
</float>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_free_subscription
</string>
</value>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/Base_createFreeSubscriptionRequest.xml
View file @
86279fcd
...
...
@@ -51,38 +51,50 @@
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
if portal.Base_getHMACHexdigest(portal.Base_getEventHMACKey(), event_id) != hmac:\n
if subscription_type == "unsubscription":\n
if portal.Base_getHMACHexdigest(portal.Base_getEventHMACKey(), event_id) != hmac:\n
from zExceptions import Unauthorized\n
raise Unauthorized\n
\n
event = portal.event_module[event_id]\n
\n
# First create a request\n
request = portal.free_subscription_request_module.newContent(\n
\n
event = portal.event_module[event_id]\n
\n
# First create a request\n
request = portal.free_subscription_request_module.newContent(\n
source=event.getSource(),\n
destination=event.getDestination(),\n
resource = event.getResource(),\n
free_subscription_request_type="unsubscription",\n
causality_value=event,\n
default_email_coordinate_text=event.getDestinationValue().getDefaultEmailCoordinateText(),\n
)\n
\n
free_subscription_list = portal.portal_catalog(portal_type="Free Subscription",\n
free_subscription_list = portal.portal_catalog(portal_type="Free Subscription",\n
default_resource_uid=event.getResourceUid(),\n
default_source_uid=event.getSourceUid(),\n
default_destination_uid=event.getDestinationUid())\n
\n
if len(free_subscription_list) != 1:\n
\n
if len(free_subscription_list) != 1:\n
raise ValueError("Impossible to find the free subscription (%d)" %\n
(len(free_subscription_list)))\n
free_subscription = free_subscription_list[0].getObject()\n
request.setFollowUpValue(free_subscription)\n
free_subscription = free_subscription_list[0].getObject()\n
request.setFollowUpValue(free_subscription)\n
\n
else:\n
request = portal.free_subscription_request_module.newContent(\n
source=source,\n
destination=destination,\n
resource=resource,\n
free_subscription_request_type="subscription",\n
causality=causality,\n
default_email_coordinate_text=portal.restrictedTraverse(destination).getDefaultEmailCoordinateText(),\n
)\n
\n
request.submit()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
event_id, hmac
</string>
</value>
<value>
<string>
causality=None, resource=None, destination=None, source=None, event_id=None, hmac=None, subscription_type="unsubscription"
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/Base_unsubscribeFromEvent.xml
View file @
86279fcd
...
...
@@ -57,13 +57,10 @@ portal = context.getPortalObject()\n
request = context.REQUEST\n
event_id = request[\'id\']\n
\n
user = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
# If we have a logged in user it\'s probably a backoffice agent.\n
if user is None:\n
# If the referer contains the url of the event we are probably viewing the event\n
# from ERP5 interface. We do not want to mark the event as delivered in that case\n
# It can also be from fckeditor, in this case we don\'t have the event url in REFERER.\n
if not ( (\'/event_module/%s\' % event_id) in request.HTTP_REFERER or \'fckeditor\' in request.HTTP_REFERER):\n
# If the referer contains the url of the event we are probably viewing the event\n
# from ERP5 interface. We do not want to mark the event as delivered in that case\n
# It can also be from fckeditor, in this case we don\'t have the event url in REFERER.\n
if not ( (\'/event_module/%s\' % event_id) in request.HTTP_REFERER or \'fckeditor\' in request.HTTP_REFERER):\n
if portal.Base_getHMACHexdigest(portal.Base_getEventHMACKey(), event_id) != request["hash"]:\n
from zExceptions import Unauthorized\n
raise Unauthorized()\n
...
...
@@ -73,8 +70,8 @@ if user is None:\n
event_id=request[\'id\'], \n
hmac=request["hash"])\n
\n
# serve the
web-page that will display a "Sucessfully unsubscribe" mess
age\n
return context.
index_html(request, request.RESPONSE, format=None
)\n
# serve the
im
age\n
return context.
Base_redirect(\'\'
)\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/Entity_createFreeSubscription.xml
View file @
86279fcd
...
...
@@ -57,6 +57,7 @@ free_subscription = context.getPortalObject().free_subscription_module.newConten
source=source,\n
resource=resource,\n
effective_date=start_date,\n
start_date=start_date,\n
title=title)\n
\n
free_subscription.validate()\n
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequestModule_viewFreeSubscriptionRequestList/listbox.xml
View file @
86279fcd
...
...
@@ -10,6 +10,7 @@
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
all_columns
</string>
<string>
columns
</string>
<string>
selection_name
</string>
<string>
title
</string>
...
...
@@ -73,6 +74,17 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
all_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
default_email_coordinate_text
</string>
<string>
Recipient Email
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
columns
</string>
</key>
<value>
...
...
@@ -97,6 +109,10 @@
<string>
translated_validation_state_title
</string>
<string>
State
</string>
</tuple>
<tuple>
<string>
creation_date
</string>
<string>
Creation Date
</string>
</tuple>
</list>
</value>
</item>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_accept.xml
View file @
86279fcd
...
...
@@ -54,7 +54,41 @@
Intent is to ignore accept/accept race conditions but complain about\n
any other race condition (ex: accept/reject).\n
"""\n
if context.getValidationState() != \'accepted\':\n
if not context.getReference():\n
context.FreeSubscriptionRequest_generateReference()\n
if context.getValidationState() != \'submitted\':\n
return\n
person = context.getDestinationValue()\n
if person:\n
email = person.getDefaultEmailCoordinateText()\n
if email and not context.getDefaultEmailCoordinateText(): # XXX workaround to fill the email field if not already set\n
context.setDefaultEmailCoordinateText(email)\n
context.accept()\n
elif context.getDefaultEmailCoordinateText():\n
email = context.getDefaultEmailCoordinateText()\n
portal = context.getPortalObject()\n
person = portal.portal_catalog.getResultValue(\n
portal_type="Person",\n
reference=email,\n
)\n
if person:\n
context.reject(comment="Person already in the user data base")\n
else:\n
person = portal.portal_catalog.getResultValue(\n
portal_type="Person",\n
default_email_text=email,\n
)\n
if not person:\n
person = portal.person_module.newContent(\n
portal_type="Person",\n
default_email_text=email,\n
title=email,\n
)\n
person.validate()\n
elif person.getReference():\n
context.reject(comment="Person already in the user data base")\n
return\n
context.setDestination(person.getRelativeUrl())\n
context.accept()\n
</string>
</value>
</item>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_generateReference.xml
View file @
86279fcd
...
...
@@ -62,6 +62,8 @@ if context.getSource():\n
\n
source_reference = \'%s-%s-%05d\' % (reference_base, group_reference, counter)\n
context.setReference(source_reference)\n
if not context.getTitle():\n
context.setTitle(source_reference)\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_view.xml
View file @
86279fcd
...
...
@@ -79,6 +79,8 @@
<string>
my_resource_title
</string>
<string>
my_causality_title
</string>
<string>
my_follow_up_title
</string>
<string>
my_default_email_coordinate_text
</string>
<string>
my_default_email_url_string
</string>
</list>
</value>
</item>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_view/my_causality_title.xml
View file @
86279fcd
...
...
@@ -112,6 +112,10 @@
<string>
Event
</string>
<string>
Event
</string>
</tuple>
<tuple>
<string>
Credential Request
</string>
<string>
Credential Request
</string>
</tuple>
</list>
</value>
</item>
...
...
@@ -121,7 +125,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Event
</string>
</value>
<value>
<string>
Causality
</string>
</value>
</item>
</dictionary>
</value>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_view/my_default_email_coordinate_text.xml
0 → 100644
View file @
86279fcd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
enabled
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_default_email_coordinate_text
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_email
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: (here.hasDefaultEmail() and not here.getDefaultEmail().isDetailed()) or not here.hasDefaultEmail()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscriptionRequest_view/my_default_email_url_string.xml
0 → 100644
View file @
86279fcd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
enabled
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_default_email_url_string
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_email_url_string
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewBaseFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python:here.hasDefaultEmail() and here.getDefaultEmail().isDetailed()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/FreeSubscription_generateReference.xml
View file @
86279fcd
...
...
@@ -62,6 +62,8 @@ if context.getSource():\n
\n
source_reference = \'%s-%s-%05d\' % (reference_base, group_reference, counter)\n
context.setReference(source_reference)\n
if not context.getTitle():\n
context.setTitle(source_reference)\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_free_subscription/SkinTemplateItem/portal_skins/erp5_free_subscription/NotificationMessage_getSubstitutionMappingDictFromEvent.xml
View file @
86279fcd
...
...
@@ -54,7 +54,6 @@
from Products.ERP5Type.Message import translateString\n
portal = context.getPortalObject()\n
format_address = portal.ERP5Site_formatFrenchAddressText\n
\n
def getSubstitutionMappingDict():\n
destination = event_value.getDestinationValue()\n
...
...
@@ -67,7 +66,7 @@ def getSubstitutionMappingDict():\n
kw[\'telephone\'] = destination.getDefaultTelephoneText() or \'\'\n
kw[\'mobile\'] = destination.getMobileTelephoneText() or \'\'\n
kw[\'creation_date\'] = destination.getCreationDate()\n
kw[\'origin_campaign\'] = destination.getOriginReference()\n
#
kw[\'origin_campaign\'] = destination.getOriginReference()\n
\n
if destination.getPortalType() == \'Person\':\n
kw[\'first_name\'] = destination.getFirstName()\n
...
...
@@ -88,7 +87,7 @@ def getSubstitutionMappingDict():\n
hmac = portal.Base_getHMACHexdigest(key=portal.Base_getEventHMACKey(), message=event_value.getId())\n
kw["image_parameters"] = "/Base_openEvent?id=%s&hash=%s" %(event_value.getId(), hmac)\n
kw["newsletter_parameters"] = "/Base_readEvent?id=%s&hash=%s" %(event_value.getId(), hmac)\n
kw["unsubscribe_parameters"] = "/Base_unsubscribe?id=%s&hash=%s" %(event_value.getId(), hmac)\n
kw["unsubscribe_parameters"] = "/Base_unsubscribe
FromEvent
?id=%s&hash=%s" %(event_value.getId(), hmac)\n
\n
return kw\n
\n
...
...
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/interactions/validate_free_subscription.xml
0 → 100644
View file @
86279fcd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionDefinition"
module=
"Products.ERP5.Interaction"
/>
</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>
<tuple/>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<list>
<string>
FreeSubscription_updateReference
</string>
</list>
</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>
validate_free_subscription
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
validate
</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>
Free Subscription
</string>
</list>
</value>
</item>
<item>
<key>
<string>
portal_type_group_filter
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
0
</int>
</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>
bt5/erp5_free_subscription/WorkflowTemplateItem/portal_workflow/free_subscription_interaction_workflow/scripts/FreeSubscription_updateReference.xml
0 → 100644
View file @
86279fcd
<?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 = state_change["object"]\n
\n
free_subscription.FreeSubscription_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>
FreeSubscription_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 @
86279fcd
...
...
@@ -59,13 +59,18 @@ if request.getFreeSubscriptionRequestType() == "unsubscription":\n
elif request.getFreeSubscriptionRequestType() == "subscription":\n
from DateTime import DateTime\n
portal = request.getPortalObject()\n
destination_value = request.getDestinationValue()\n
free_subscription = portal.free_subscription_module.newContent(\n
source=request.getSource(),\n
destination
=request.getDestination()
,\n
destination
_value=destination_value
,\n
resource=request.getResource(),\n
effective_date=DateTime())\n
free_subscription.validate()\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>
</item>
<item>
...
...
bt5/erp5_free_subscription/bt/template_base_category_list
View file @
86279fcd
free_subscription_request_type
product_line/subscription
role/newsletter_subscriber
use/crm/free_subscription
\ No newline at end of file
bt5/erp5_free_subscription/bt/template_portal_type_allowed_content_type_list
View file @
86279fcd
Free Subscription Module | Free Subscription
Free Subscription Request Module | Free Subscription Request
Free Subscription Request | Email
\ No newline at end of file
bt5/erp5_free_subscription/bt/template_portal_type_property_sheet_list
View file @
86279fcd
Free Subscription Request | Arrow
Free Subscription Request | DublinCore
Free Subscription Request | Person
Free Subscription Request | Reference
Free Subscription Request | Reference
Free Subscription | DublinCore
Free Subscription | Version
\ 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