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
Léo-Paul Géneau
erp5
Commits
3270183e
Commit
3270183e
authored
Aug 05, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_crm: add batch_mode to PersonModule_newEvent to allow calls from another script
parent
7b740018
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/PersonModule_newEvent.xml
...plateItem/portal_skins/erp5_crm/PersonModule_newEvent.xml
+7
-1
bt5/erp5_crm/bt/revision
bt5/erp5_crm/bt/revision
+1
-1
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/PersonModule_newEvent.xml
View file @
3270183e
...
@@ -68,6 +68,7 @@ if not person_list:\n
...
@@ -68,6 +68,7 @@ if not person_list:\n
user = context.portal_membership.getAuthenticatedMember()\n
user = context.portal_membership.getAuthenticatedMember()\n
user_person = context.portal_catalog.getResultValue(portal_type=\'Person\', reference=str(user))\n
user_person = context.portal_catalog.getResultValue(portal_type=\'Person\', reference=str(user))\n
\n
\n
event_list = []\n
# For every person, create an event\n
# For every person, create an event\n
if not single_event:\n
if not single_event:\n
count = 0\n
count = 0\n
...
@@ -88,6 +89,7 @@ if not single_event:\n
...
@@ -88,6 +89,7 @@ if not single_event:\n
event.setDestinationValue(person.getObject())\n
event.setDestinationValue(person.getObject())\n
event.setSourceValue(user_person)\n
event.setSourceValue(user_person)\n
event.plan()\n
event.plan()\n
event_list.append(event)\n
else:\n
else:\n
if direction == \'incoming\' and len(person_list) >
1:\n
if direction == \'incoming\' and len(person_list) >
1:\n
# This case is not possible\n
# This case is not possible\n
...
@@ -104,6 +106,10 @@ else:\n
...
@@ -104,6 +106,10 @@ else:\n
event.setSourceValue(user_person)\n
event.setSourceValue(user_person)\n
event.plan()\n
event.plan()\n
count = 1\n
count = 1\n
event_list.append(event)\n
\n
if batch_mode:\n
return event_list\n
\n
\n
portal_status_message = translateString("Created and associated ${count} new events to the selected ticket.", \n
portal_status_message = translateString("Created and associated ${count} new events to the selected ticket.", \n
mapping=dict(count=count))\n
mapping=dict(count=count))\n
...
@@ -115,7 +121,7 @@ context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_st
...
@@ -115,7 +121,7 @@ context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_st
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
portal_type, title, description, direction, selection_name, follow_up=None, single_event=0, text_content=None, form_id=None, **kw
</string>
</value>
<value>
<string>
portal_type, title, description, direction, selection_name, follow_up=None, single_event=0, text_content=None, form_id=None,
batch_mode=0,
**kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_crm/bt/revision
View file @
3270183e
662
663
\ 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