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
Labels
Merge Requests
141
Merge Requests
141
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
49d87cf5
Commit
49d87cf5
authored
Oct 12, 2011
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for multiple site properties in imported BTs.
parent
3f614007
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+9
-9
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
49d87cf5
...
...
@@ -3106,15 +3106,15 @@ class SitePropertyTemplateItem(BaseTemplateItem):
LOG
(
'Business Template'
,
0
,
'Skipping file "%s"'
%
(
file_name
,
))
return
xml
=
parse
(
file
)
property_node
=
xml
.
getroot
()[
0
]
property_id
=
property_node
.
find
(
'id'
).
text
prop_type
=
property_node
.
find
(
'type'
).
text
value_node
=
property_node
.
find
(
'value'
)
if
prop_type
in
(
'lines'
,
'tokens'
):
value
=
[
item
.
text
for
item
in
value_node
.
findall
(
'item'
)]
else
:
value
=
value_node
.
text
self
.
_objects
[
property_id
]
=
(
prop_type
,
value
)
for
property_node
in
xml
.
getroot
().
findall
(
'property'
):
property_id
=
property_node
.
find
(
'id'
).
text
prop_type
=
property_node
.
find
(
'type'
).
text
value_node
=
property_node
.
find
(
'value'
)
if
prop_type
in
(
'lines'
,
'tokens'
):
value
=
[
item
.
text
for
item
in
value_node
.
findall
(
'item'
)]
else
:
value
=
value_node
.
text
self
.
_objects
[
property_id
]
=
(
prop_type
,
value
)
def
install
(
self
,
context
,
trashbin
,
**
kw
):
update_dict
=
kw
.
get
(
'object_to_update'
)
...
...
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