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
269faa8d
Commit
269faa8d
authored
Mar 20, 2023
by
Jérome Perrin
Committed by
Arnaud Fontaine
Jul 31, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BusinessTemplate: py3 WIP
🚧
parent
1130af45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+4
-4
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
269faa8d
...
...
@@ -724,7 +724,7 @@ class ObjectTemplateItem(BaseTemplateItem):
def
__init__
(
self
,
id_list
,
tool_id
=
None
,
**
kw
):
BaseTemplateItem
.
__init__
(
self
,
id_list
,
tool_id
=
tool_id
,
**
kw
)
if
tool_id
is
not
None
:
id_list
=
self
.
_archive
.
keys
(
)
id_list
=
ensure_list
(
self
.
_archive
.
keys
()
)
self
.
_archive
.
clear
()
for
id
in
id_list
:
if
id
!=
''
:
...
...
@@ -3511,14 +3511,14 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem):
prop_value
=
role
.
get
(
property
)
if
prop_value
:
if
isinstance
(
prop_value
,
str
):
prop_value
=
escape
(
prop_value
.
decode
(
'utf-8'
)
)
prop_value
=
escape
(
prop_value
)
xml_data
+=
"
\
n
<property id='%s'>%s</property>"
%
\
(
property
,
prop_value
)
# multi
for
property
in
(
'categories'
,
'category'
,
'base_category'
):
for
prop_value
in
role
.
get
(
property
,
[]):
if
isinstance
(
prop_value
,
str
):
prop_value
=
escape
(
prop_value
.
decode
(
'utf-8'
)
)
prop_value
=
escape
(
prop_value
)
xml_data
+=
"
\
n
<multi_property "
\
"id='%s'>%s</multi_property>"
%
(
property
,
prop_value
)
xml_data
+=
"
\
n
</role>"
...
...
@@ -3971,7 +3971,7 @@ class FilesystemDocumentTemplateItem(BaseTemplateItem):
if
not
file_name
.
endswith
(
'.py'
):
LOG
(
'Business Template'
,
0
,
'Skipping file "%s"'
%
(
file_name
,
))
return
text
=
file
.
read
()
text
=
file
.
read
()
.
decode
(
'utf-8'
)
self
.
_objects
[
file_name
[:
-
3
]]
=
text
class
FilesystemToZodbTemplateItem
(
FilesystemDocumentTemplateItem
,
...
...
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