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
Levin Zimmermann
erp5
Commits
2b1a4da8
Commit
2b1a4da8
authored
Jan 10, 2012
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup create_ticket_action.
parent
d4c14339
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
31 additions
and
475 deletions
+31
-475
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createFollowUpTicket.xml
...Item/portal_skins/erp5_crm/Event_createFollowUpTicket.xml
+24
-11
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_newFollowUpTicket.xml
...ateItem/portal_skins/erp5_crm/Event_newFollowUpTicket.xml
+5
-4
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateTicketWorkflowActionDialog.xml
...s/erp5_crm/Event_viewCreateTicketWorkflowActionDialog.xml
+0
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateTicketWorkflowActionDialog/your_follow_up_ticket_resource.xml
...etWorkflowActionDialog/your_follow_up_ticket_resource.xml
+0
-131
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/scripts/Event_createResponseEvent.xml
...simulation_workflow/scripts/Event_createResponseEvent.xml
+0
-94
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/scripts/Event_createTicket.xml
.../event_simulation_workflow/scripts/Event_createTicket.xml
+0
-106
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/transitions/create_ticket.xml
...w/event_simulation_workflow/transitions/create_ticket.xml
+0
-58
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/transitions/create_ticket_action.xml
..._simulation_workflow/transitions/create_ticket_action.xml
+1
-21
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/variables/ticket_portal_type.xml
...vent_simulation_workflow/variables/ticket_portal_type.xml
+0
-48
bt5/erp5_crm/bt/revision
bt5/erp5_crm/bt/revision
+1
-1
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createFollowUpTicket.xml
View file @
2b1a4da8
...
...
@@ -53,20 +53,33 @@
<value>
<string>
# this script allows to create a new follow up ticket for a given event\n
portal = context.getPortalObject()\n
event = context\n
ticket_module = portal.getPortalObject().getDefaultModule(follow_up_ticket_type)\n
\n
# Create a new object\n
new_object = ticket_module.newContent(\n
portal_type=follow_up_ticket_type,\n
title=follow_up_ticket_title,\n
resource=follow_up_ticket_resource,\n
destination_decision_list=event.getSourceList()\n
)\n
operator_list = event.getDestinationList()\n
try:\n
source_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
except ValueError:\n
source_value = None\n
if source_value is not None:\n
source_section_value = source_value.getDefaultCareerSubordinationValue()\n
operator_list.append(source_value.getRelativeUrl())\n
else:\n
source_section_value = None\n
\n
module = portal.getDefaultModule(ticket_portal_type)\n
ticket = module.newContent(\n
portal_type=ticket_portal_type,\n
title=follow_up_ticket_title,\n
start_date=event.getStartDate(),\n
destination_decision_list=event.getSourceList(),\n
destination_section=event.getSourceSection() or event.getSource(),\n
source_trade_set=operator_list,\n
source_value=source_value,\n
source_section_value=source_section_value,\n
)\n
\n
# Now create the relation between the event object and the new follow up ticket\n
follow_up_list = event.getFollowUpList()\n
follow_up_list.append(
new_objec
t.getRelativeUrl())\n
event.
setFollowUpValueList(
follow_up_list)\n
follow_up_list.append(
ticke
t.getRelativeUrl())\n
event.
edit(follow_up_list=
follow_up_list)\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_newFollowUpTicket.xml
View file @
2b1a4da8
...
...
@@ -51,16 +51,17 @@
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
context.Event_createFollowUpTicket(follow_up_ticket_type=follow_up_ticket_type,\n
follow_up_ticket_title=follow_up_ticket_title,\n
follow_up_ticket_resource=follow_up_ticket_resource)\n
\n
follow_up_ticket_title=follow_up_ticket_title)\n
if context.getPortalObject().portal_workflow.isTransitionPossible(\n
context, \'deliver\'):\n
context.deliver()\n
return context.Base_redirect("", \n
keep_items={\'portal_status_message\':context.getPortalObject().Base_translateString("Follow Up Ticket Created.")})\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
follow_up_ticket_type=None, follow_up_ticket_title=None,
follow_up_ticket_resource=None,
**kw
</string>
</value>
<value>
<string>
follow_up_ticket_type=None, follow_up_ticket_title=None, **kw
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateTicketWorkflowActionDialog.xml
View file @
2b1a4da8
...
...
@@ -95,7 +95,6 @@
<list>
<string>
your_follow_up_ticket_title
</string>
<string>
your_follow_up_ticket_type
</string>
<string>
your_follow_up_ticket_resource
</string>
</list>
</value>
</item>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_viewCreateTicketWorkflowActionDialog/your_follow_up_ticket_resource.xml
deleted
100644 → 0
View file @
d4c14339
<?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>
items
</string>
<string>
required
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_follow_up_ticket_resource
</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>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Ticket Nature
</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>
here/Ticket_getResourceItemList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/scripts/Event_createResponseEvent.xml
deleted
100644 → 0
View file @
d4c14339
<?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>
# this script allows to create a new respond event for\n
# the current event and send message immediately.\n
portal = state_change.getPortal()\n
portal_workflow = portal.portal_workflow\n
event = state_change[\'object\']\n
\n
portal_type = portal_workflow.getInfoFor(event,\n
\'respond_event_portal_type\')\n
\n
\n
# Pass Mark Responded transition.\n
if not portal_type:\n
raise ValueError, \'No portal_type provided.\'\n
\n
text_content = portal_workflow.getInfoFor(event,\n
\'respond_event_text_content\')\n
title = portal_workflow.getInfoFor(event, \'respond_event_title\')\n
resource = portal_workflow.getInfoFor(event, \'respond_event_resource\')\n
\n
event.Event_createRespondEvent(portal_type, title, resource, text_content)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Event_createResponseEvent
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/scripts/Event_createTicket.xml
deleted
100644 → 0
View file @
d4c14339
<?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>
event = state_change[\'object\']\n
portal = event.getPortalObject()\n
\n
\n
ticket_portal_type = portal.portal_workflow.getInfoFor(event, \'ticket_portal_type\')\n
\n
operator_list = event.getDestinationList()\n
\n
try:\n
source_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
except ValueError:\n
source_value = None\n
if source_value is not None:\n
source_section_value = source_value.getDefaultCareerSubordinationValue()\n
operator_list.append(source_value.getRelativeUrl())\n
else:\n
source_section_value = None\n
\n
module = portal.getDefaultModule(ticket_portal_type)\n
ticket = module.newContent(\n
portal_type=ticket_portal_type,\n
start_date=event.getStartDate(),\n
destination_decision=event.getSource(),\n
destination_section=event.getSourceSection() or event.getSource(),\n
source_trade_set=operator_list,\n
source_value=source_value,\n
source_section_value=source_section_value,\n
)\n
\n
follow_up_list = event.getFollowUpList()\n
follow_up_list.append(ticket.getRelativeUrl())\n
event.edit(follow_up_list=follow_up_list)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Event_createTicket
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/transitions/create_ticket.xml
deleted
100644 → 0
View file @
d4c14339
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"TransitionDefinition"
module=
"Products.DCWorkflow.Transitions"
/>
</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>
after_script_name
</string>
</key>
<value>
<string>
Event_createTicket
</string>
</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>
create_ticket
</string>
</value>
</item>
<item>
<key>
<string>
new_state_id
</string>
</key>
<value>
<string>
delivered
</string>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Create Follow Up Ticket
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/transitions/create_ticket_action.xml
View file @
2b1a4da8
...
...
@@ -89,30 +89,10 @@
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
ticket_portal_type
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: state_change.kwargs[\'ticket_portal_type\']
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/variables/ticket_portal_type.xml
deleted
100644 → 0
View file @
d4c14339
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"VariableDefinition"
module=
"Products.DCWorkflow.Variables"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_expr
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_value
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Ticket Type
</string>
</value>
</item>
<item>
<key>
<string>
for_catalog
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
for_status
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ticket_portal_type
</string>
</value>
</item>
<item>
<key>
<string>
info_guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
update_always
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/bt/revision
View file @
2b1a4da8
583
\ No newline at end of file
584
\ 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