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
Mikolaï Krol
erp5
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 @@
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
\n
campaign = portal.portal_domains.restrictedTraverse(follow_up)\n
event_portal_type = campaign.getDefaultEventPathEventPortalType()\n
resource_reference = campaign.getDefaultEventPathResourceReference()\n
source = campaign.getDefaultEventPathSource()\n
event_path = portal.restrictedTraverse(event_path)\n
follow_up = event_path.getParentRelativeUrl()\n
event_portal_type = event_path.getEventPortalType()\n
resource_reference = event_path.getResourceReference()\n
source = event_path.getSource()\n
\n
language = context.getLanguage()\n
notification_message = portal.notification_message_module.NotificationTool_getDocumentValue(\n
...
...
@@ -77,13 +78,15 @@ event = context.Base_addEvent(title=notification_message.getTitle(),\n
keep_draft=keep_draft,\n
batch_mode=True)\n
\n
event.edit(follow_up=follow_up,\n
source=source)\n
event.setFollowUp(follow_up)\n
\n
if event.getSource() is None:\n
event.setSource(source)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
follow_up
, keep_draft
</string>
</value>
<value>
<string>
event_path
, keep_draft
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_createEventFromDefaultEventPath.xml
View file @
02b04836
...
...
@@ -53,14 +53,16 @@
<value>
<string>
portal = context.getPortalObject()\n
destination = context.getDefaultEventPathDestination()\n
domain = portal.portal_domains.restrictedTraverse(destination)\n
event_path = context.getDefaultEventPathValue(portal_type="Event Path")\n
\n
method_kw = {\'
follow_up\': context
.getRelativeUrl(),\n
\'keep_draft\': keep_draft}\n
method_kw = {\'
event_path\': event_path
.getRelativeUrl(),\n
\'keep_draft\': keep_draft}\n
portal.portal_catalog.searchAndActivate("Entity_createEventFromDefaultEventPath",\n
selection_domain={domain.getParentId(): (\'portal_domains\', destination)},\n
method_kw=method_kw)\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>
</item>
<item>
...
...
bt5/erp5_crm/bt/revision
View file @
02b04836
612
\ No newline at end of file
614
\ 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