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
Nicolas Wavrant
erp5
Commits
b49db358
Commit
b49db358
authored
Mar 30, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_crm: introduce a batch_mode in Event_createResponse
parent
49b9a3fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createResponse.py
...emplateItem/portal_skins/erp5_crm/Event_createResponse.py
+13
-5
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createResponse.xml
...mplateItem/portal_skins/erp5_crm/Event_createResponse.xml
+1
-1
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createResponse.py
View file @
b49db358
...
...
@@ -20,17 +20,25 @@ if response_event_notification_message:
substitution_method_parameter_dict
=
dict
(
reply_body
=
context
.
getReplyBody
(),
reply_subject
=
context
.
getReplySubject
()))
message
=
portal
.
Base_translateString
(
'Response Created.'
)
def
redirect
(
obj
,
view
):
if
batch_mode
:
return
response
else
:
return
obj
.
Base_redirect
(
view
,
keep_items
=
{
'portal_status_message'
:
portal
.
Base_translateString
(
'Response Created.'
)}
)
if
response_workflow_action
==
'send'
:
response
.
start
()
return
context
.
Base_redirect
(
form_id
,
keep_items
=
{
'portal_status_message'
:
message
}
)
return
redirect
(
context
,
form_id
)
elif
response_workflow_action
==
'plan'
:
response
.
plan
()
return
context
.
Base_redirect
(
form_id
,
keep_items
=
{
'portal_status_message'
:
message
}
)
return
redirect
(
context
,
form_id
)
elif
response_workflow_action
==
'deliver'
:
response
.
deliver
()
return
re
sponse
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
message
}
)
return
re
direct
(
response
,
'view'
)
elif
response_workflow_action
==
'draft'
:
return
re
sponse
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
message
}
)
return
re
direct
(
response
,
'view'
)
else
:
raise
NotImplementedError
(
'Do not know what to do'
)
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createResponse.xml
View file @
b49db358
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
form_id=None, response_event_portal_type=None, response_event_resource=None,
response_event_title=None, response_event_text_content=None, response_event_start_date=None, response_workflow_action=None, response_event_notification_message=None, default_destination=None, response_event_content_type=Non
e, **kw
</string>
</value>
<value>
<string>
form_id=None, response_event_portal_type=None, response_event_resource=None,
response_event_title=None, response_event_text_content=None, response_event_start_date=None, response_workflow_action=None, response_event_notification_message=None, default_destination=None, response_event_content_type=None, batch_mode=Fals
e, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
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