Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
02b04836
Commit
02b04836
authored
Apr 26, 2013
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor code to pass the event path instead of the Campaign
parent
45bab5a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_createEventFromDefaultEventPath.xml
...skins/erp5_crm/Entity_createEventFromDefaultEventPath.xml
+10
-7
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_createEventFromDefaultEventPath.xml
...skins/erp5_crm/Ticket_createEventFromDefaultEventPath.xml
+5
-3
bt5/erp5_crm/bt/revision
bt5/erp5_crm/bt/revision
+1
-1
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_createEventFromDefaultEventPath.xml
View file @
02b04836
...
@@ -52,10 +52,11 @@
...
@@ -52,10 +52,11 @@
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
<value>
<string>
portal = context.getPortalObject()\n
\n
\n
campaign = portal.portal_domains.restrictedTraverse(follow_up)\n
event_path = portal.restrictedTraverse(event_path)\n
event_portal_type = campaign.getDefaultEventPathEventPortalType()\n
follow_up = event_path.getParentRelativeUrl()\n
resource_reference = campaign.getDefaultEventPathResourceReference()\n
event_portal_type = event_path.getEventPortalType()\n
source = campaign.getDefaultEventPathSource()\n
resource_reference = event_path.getResourceReference()\n
source = event_path.getSource()\n
\n
\n
language = context.getLanguage()\n
language = context.getLanguage()\n
notification_message = portal.notification_message_module.NotificationTool_getDocumentValue(\n
notification_message = portal.notification_message_module.NotificationTool_getDocumentValue(\n
...
@@ -77,13 +78,15 @@ event = context.Base_addEvent(title=notification_message.getTitle(),\n
...
@@ -77,13 +78,15 @@ event = context.Base_addEvent(title=notification_message.getTitle(),\n
keep_draft=keep_draft,\n
keep_draft=keep_draft,\n
batch_mode=True)\n
batch_mode=True)\n
\n
\n
event.edit(follow_up=follow_up,\n
event.setFollowUp(follow_up)\n
source=source)\n
\n
if event.getSource() is None:\n
event.setSource(source)\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
follow_up
, keep_draft
</string>
</value>
<value>
<string>
event_path
, keep_draft
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_createEventFromDefaultEventPath.xml
View file @
02b04836
...
@@ -53,14 +53,16 @@
...
@@ -53,14 +53,16 @@
<value>
<string>
portal = context.getPortalObject()\n
<value>
<string>
portal = context.getPortalObject()\n
destination = context.getDefaultEventPathDestination()\n
destination = context.getDefaultEventPathDestination()\n
domain = portal.portal_domains.restrictedTraverse(destination)\n
domain = portal.portal_domains.restrictedTraverse(destination)\n
event_path = context.getDefaultEventPathValue(portal_type="Event Path")\n
\n
\n
method_kw = {\'
follow_up\': context
.getRelativeUrl(),\n
method_kw = {\'
event_path\': event_path
.getRelativeUrl(),\n
\'keep_draft\': keep_draft}\n
\'keep_draft\': keep_draft}\n
portal.portal_catalog.searchAndActivate("Entity_createEventFromDefaultEventPath",\n
portal.portal_catalog.searchAndActivate("Entity_createEventFromDefaultEventPath",\n
selection_domain={domain.getParentId(): (\'portal_domains\', destination)},\n
selection_domain={domain.getParentId(): (\'portal_domains\', destination)},\n
method_kw=method_kw)\n
method_kw=method_kw)\n
\n
\n
context.Base_redirect(keep_items={\'portal_status_message\': context.Base_translateString(\'Events are being created in background\')})\n
return context.Base_redirect(\n
keep_items={\'portal_status_message\': context.Base_translateString(\'Events are being created in background\')})\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
bt5/erp5_crm/bt/revision
View file @
02b04836
612
614
\ No newline at end of file
\ 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