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
Laurent S
erp5
Commits
6af566f8
Commit
6af566f8
authored
Apr 10, 2014
by
Mame Coumba Sall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified to avoid too many functions or groups set when contributing a document.
parent
76ce5e7f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Document_getPropertyDictFromUserLogin.xml
.../erp5_ingestion/Document_getPropertyDictFromUserLogin.xml
+13
-4
bt5/erp5_ingestion/bt/revision
bt5/erp5_ingestion/bt/revision
+1
-1
No files found.
bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Document_getPropertyDictFromUserLogin.xml
View file @
6af566f8
...
...
@@ -56,11 +56,20 @@ User would be usually the current user, but sometimes the name has to be given e
if e.g. the doc is contributed by email, and the script is run by zope user.\n
"""\n
assignment_dict = context.ERP5Site_getPersonAssignmentDict(user_name=user_name)\n
group_list = assignment_dict[\'group_list\']\n
\n
# XXX: make list of properties configurable through preferences\n
return {\'group_list\': assignment_dict[\'group_list\'],\n
\'site_list\': assignment_dict[\'site_list\'],\n
\'function_list\': assignment_dict[\'function_list\']}\n
group_level_dict = {}\n
for group in group_list:\n
group_level = len(group.split("/"))\n
group_level_dict[group] = group_level\n
\n
\n
#Get the highest levels groups of the assignments\n
##if group_list = [\'nexedi\', \'nexedi/hq\', \'nexedi/jp\'] returns [\'nexedi\']\n
##if group_list = [\'nexedi/hq\', \'nexedi/jp\'] returns [\'nexedi/hq\', \'nexedi/jp\']\n
highest_level_group_value = min(group_level_dict.itervalues())\n
highest_level_groups = [k for k in group_level_dict if group_level_dict[k] == highest_level_group_value]\n
return {\'group_list\': highest_level_groups}\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_ingestion/bt/revision
View file @
6af566f8
151
\ No newline at end of file
152
\ 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