Commit f7c86a4a authored by Romain Courteaud's avatar Romain Courteaud

[erp5_project] Drop validated_project_domain

Domains are not meant to display too many documents at the same level.
parent 31804f68
<?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>_identity_criterion</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateValidatedProjectDomain</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>validated_project_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>Validated Project Domain</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
request = context.REQUEST
domain_list = []
category_list = []
if depth == 0:
category_list = [x for x in context.portal_catalog(portal_type='Project',
validation_state='validated')]
else:
parent_object = context.restrictedTraverse(parent.parent_url)
category_list = parent_object.contentValues(portal_type='Project Line', sort_on='int_index')
for category in category_list:
domain = parent.generateTempDomain(id='sub%s' % category.getId())
membership_criterion_category = []
sub_category_list = [category]
while sub_category_list:
sub_category = sub_category_list.pop()
membership_criterion_category.append('source_project/%s/' % sub_category.getRelativeUrl())
sub_category_list.extend(sub_category.contentValues(portal_type='Project Line'))
domain.edit(title = category.getTitle(),
membership_criterion_base_category = ('source_project', ),
membership_criterion_category = membership_criterion_category,
domain_generator_method_id = script.id,
parent_url=category.getRelativeUrl(),
uid = category.getUid())
domain_list.append(domain)
return domain_list
<?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>_params</string> </key>
<value> <string>depth, parent, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_generateValidatedProjectDomain</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -197,10 +197,6 @@ ...@@ -197,10 +197,6 @@
<string>ledger</string> <string>ledger</string>
<string>Ledger</string> <string>Ledger</string>
</tuple> </tuple>
<tuple>
<string>validated_project_domain</string>
<string>Open Projects</string>
</tuple>
<tuple> <tuple>
<string>preferred_group_person_list_domain</string> <string>preferred_group_person_list_domain</string>
<string>Persons</string> <string>Persons</string>
......
...@@ -208,10 +208,6 @@ ...@@ -208,10 +208,6 @@
<string>ledger</string> <string>ledger</string>
<string>Ledger</string> <string>Ledger</string>
</tuple> </tuple>
<tuple>
<string>validated_project_domain</string>
<string>Open Projects</string>
</tuple>
<tuple> <tuple>
<string>preferred_group_person_list_domain</string> <string>preferred_group_person_list_domain</string>
<string>Persons</string> <string>Persons</string>
......
...@@ -15,4 +15,3 @@ portal_domains/task_module_project_domain ...@@ -15,4 +15,3 @@ portal_domains/task_module_project_domain
portal_domains/task_report_module_domain portal_domains/task_report_module_domain
portal_domains/task_report_module_person_domain portal_domains/task_report_module_person_domain
portal_domains/task_report_module_project_domain portal_domains/task_report_module_project_domain
portal_domains/validated_project_domain
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment