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
Kasra Jamshidi
erp5
Commits
595a329d
Commit
595a329d
authored
Jan 30, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_prototype: No need tot explicitly add _list of multiple type propertiesd
parent
95547d60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
product/ERP5/Document/BusinessPackage.py
product/ERP5/Document/BusinessPackage.py
+3
-2
No files found.
product/ERP5/Document/BusinessPackage.py
View file @
595a329d
...
...
@@ -970,15 +970,16 @@ class ObjectPropertyTemplatePackageItem(Implicit, Persistent):
LOG
(
'Business Template'
,
0
,
'Skipping file "%s"'
%
(
file_name
,
))
return
xml
=
parse
(
file
)
multiple_type
=
(
'lines'
,
'selection'
,
'multiple selection'
)
object_list
=
xml
.
findall
(
'object'
)
for
obj
in
object_list
:
for
obj_property
in
obj
.
findall
(
'property'
):
item_list
=
[]
for
item
in
obj_property
.
findall
(
'item'
):
item_list
.
append
(
item
.
text
)
property_name
=
obj_property
.
find
(
'name'
).
text
+
(
''
if
len
(
item_list
)
<=
1
else
'_list'
)
property_name
=
obj_property
.
find
(
'name'
).
text
property_type
=
obj_property
.
find
(
'type'
).
text
if
property_type
not
in
(
'lines'
,
'selection'
,
'multiple selection'
)
:
if
property_type
not
in
multiple_type
:
try
:
item_list
=
item_list
[
0
]
except
IndexError
:
...
...
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