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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
erp5
Commits
ee7eafb4
Commit
ee7eafb4
authored
Jul 05, 2011
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix getSortedCategoryList. Category may be a predicate located in non base category document.
parent
688cf160
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
product/ERP5Type/tests/utils.py
product/ERP5Type/tests/utils.py
+7
-8
No files found.
product/ERP5Type/tests/utils.py
View file @
ee7eafb4
...
...
@@ -540,17 +540,16 @@ def updateCellList(portal, line, cell_type, cell_range_method, cell_dict_list):
return
range_list
def
getSortedCategoryList
(
line
,
base_id
,
category_list
):
category_dict
=
{}
for
category
in
category_list
:
category_dict
[
category
.
split
(
'/'
)[
0
]]
=
category
result
=
[]
index_list
=
line
.
index
[
base_id
].
keys
()
index_list
.
sort
()
for
index
in
index_list
:
if
line
.
index
[
base_id
][
index
]:
base_category
=
line
.
index
[
base_id
][
index
].
keys
()[
0
].
split
(
'/'
)[
0
]
result
.
append
(
category_dict
[
base_category
])
return
result
for
category
in
category_list
:
for
index
in
index_list
:
if
line
.
index
[
base_id
][
index
]:
if
category
in
line
.
index
[
base_id
][
index
]:
result
.
append
((
index
,
category
))
result
.
sort
()
return
[
category
for
index
,
category
in
result
]
for
cell_dict
in
cell_dict_list
:
base_id
=
cell_dict
[
'base_id'
]
...
...
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