Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Yusei Tahara
erp5
Commits
336a8d63
Commit
336a8d63
authored
13 years ago
by
Kazuhiko Shiozaki
Browse files
Options
Download
Email Patches
Plain Diff
create support request's reference just same as event's reference.
parent
79523eee
Changes
2
Hide 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>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_crm/bt/revision
View file @
336a8d63
567
\ No newline at end of file
568
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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