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
Hugo Ricateau
erp5
Commits
336a8d63
Commit
336a8d63
authored
Jul 07, 2011
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create support request's reference just same as event's reference.
parent
79523eee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/SupportRequest_init.xml
...emplateItem/portal_skins/erp5_crm/SupportRequest_init.xml
+14
-3
bt5/erp5_crm/bt/revision
bt5/erp5_crm/bt/revision
+1
-1
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/SupportRequest_init.xml
View file @
336a8d63
...
...
@@ -50,9 +50,20 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
# Define Reference from ID\n
support_request_id = context.getId()\n
context.setReference("SR-%s" % support_request_id)\n
<value>
<string>
# Define Reference from ID provided by portal_ids\n
portal = context.getPortalObject()\n
type_definition = context.getTypeInfo()\n
\n
short_portal_type = type_definition.getShortTitle()\n
if not short_portal_type:\n
short_portal_type = \'\'.join(s for s in type_definition.getId() if s.isupper())\n
\n
id_group = (\'reference\', short_portal_type)\n
default = 1\n
new_id = portal.portal_ids.generateNewId(id_group=id_group, default=default)\n
reference = \'%s-%s\' % (short_portal_type, new_id)\n
\n
context.setReference(reference)\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_crm/bt/revision
View file @
336a8d63
567
\ No newline at end of file
568
\ 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