Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
31af1bb0
Commit
31af1bb0
authored
Jul 01, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a domain on ticket modules showing uses and services
parent
50f5f9b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
272 additions
and
11 deletions
+272
-11
bt5/erp5_crm/PathTemplateItem/portal_domains/ticket_use_domain.xml
...crm/PathTemplateItem/portal_domains/ticket_use_domain.xml
+116
-0
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_generateTicketUseDomain.xml
...em/portal_skins/erp5_crm/Base_generateTicketUseDomain.xml
+121
-0
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Folder_viewTicketList/listbox.xml
...m/portal_skins/erp5_crm/Folder_viewTicketList/listbox.xml
+33
-10
bt5/erp5_crm/bt/template_path_list
bt5/erp5_crm/bt/template_path_list
+2
-1
No files found.
bt5/erp5_crm/PathTemplateItem/portal_domains/ticket_use_domain.xml
0 → 100644
View file @
31af1bb0
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Base Domain"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAY=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
domain_generator_method_id
</string>
</key>
<value>
<string>
Base_generateTicketUseDomain
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ticket_use_domain
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Base Domain
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Ticket Use Domain
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"6"
aka=
"AAAAAAAAAAY="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_generateTicketUseDomain.xml
0 → 100644
View file @
31af1bb0
<?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
encoding=
"cdata"
>
<![CDATA[
portal = context.getPortalObject()\n
request = context.REQUEST\n
domain_list = []\n
\n
here = request[\'here\']\n
portal_type = here.getPortalType().replace(\' Module\', \'\')\n
\n
preference_id = \'preferred_%s_use\' % \'_\'.join(token.lower() for token in portal_type.split(\' \'))\n
preferred_use = portal.portal_preferences.getPreference(preference_id)\n
if not preferred_use:\n
return ()\n
\n
use = portal.portal_categories.use.restrictedTraverse(preferred_use)\n
sub_use_list = use.contentValues()\n
\n
max_depth = 0\n
if sub_use_list:\n
max_depth = 1\n
if depth >
max_depth:\n
return ()\n
\n
if sub_use_list:\n
if depth == 0:\n
for sub_use in sub_use_list:\n
domain = parent.generateTempDomain(id = \'new_%s\' % sub_use.getProperty(\'uid\'))\n
domain.edit(title=sub_use.getTranslatedTitle(),\n
membership_criterion_category=(sub_use.getRelativeUrl(),),\n
domain_generator_method_id=script.id,\n
uid=use.getUid())\n
domain.setCriterionPropertyList([\'related_resource_from_use_category_uid\'])\n
domain.setCriterion(\'related_resource_from_use_category_uid\', identity=sub_use.getUid())\n
domain_list.append(domain)\n
return domain_list\n
else:\n
use = portal.portal_categories.use.restrictedTraverse(parent.getMembershipCriterionCategory())\n
\n
sql_kw = { \'portal_type\': portal.getPortalResourceTypeList(),\n
\'use_uid\': use.getUid(),\n
\'validation_state\': \'validated\',\n
\'sort_on\': \'title\'}\n
\n
for service in portal.portal_catalog(**sql_kw):\n
domain = parent.generateTempDomain(id = \'new_%s\' % service.getProperty(\'uid\'))\n
domain.edit(title=service.getTranslatedTitle(),\n
membership_criterion_base_category=(\'resource\', ),\n
membership_criterion_category=(\'resource/%s\' % service.getRelativeUrl(),),\n
domain_generator_method_id=script.id,\n
uid=service.getUid())\n
domain_list.append(domain)\n
\n
return domain_list\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
depth, parent, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_generateTicketUseDomain
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Folder_viewTicketList/listbox.xml
View file @
31af1bb0
...
...
@@ -485,6 +485,10 @@
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default_display_style
</string>
</key>
<value>
<string>
table
</string>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
...
...
@@ -496,14 +500,25 @@
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
d
omain_root
_list
</string>
</key>
<key>
<string>
d
isplay_style
_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
domain_root_list
</string>
</key>
<value>
<list>
<tuple>
<string>
ticket_use_domain
</string>
<string>
Type
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
domain_tree
</string>
</key>
<value>
<int>
0
</int>
</value>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
...
...
@@ -538,6 +553,10 @@
<list/>
</value>
</item>
<item>
<key>
<string>
global_search_column
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
...
...
@@ -566,6 +585,10 @@
<list/>
</value>
</item>
<item>
<key>
<string>
page_navigation_template
</string>
</key>
<value>
<string>
ListBox_viewSliderPageNavigationRenderer
</string>
</value>
</item>
<item>
<key>
<string>
page_template
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -784,6 +807,12 @@
<key>
<string>
stat_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
style_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Tickets
</string>
</value>
...
...
@@ -856,10 +885,7 @@
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<tuple>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
<tuple/>
</tuple>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
...
...
@@ -872,10 +898,7 @@
</record>
<record
id=
"6"
aka=
"AAAAAAAAAAY="
>
<pickle>
<tuple>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
<tuple/>
</tuple>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
...
...
bt5/erp5_crm/bt/template_path_list
View file @
31af1bb0
portal_alarms/upgrader_migrate_event_workflow_history
portal_contribution_registry/crm_ingestion
\ No newline at end of file
portal_contribution_registry/crm_ingestion
portal_domains/ticket_use_domain
\ 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