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
Carlos Ramos Carreño
erp5
Commits
e2e1339f
Commit
e2e1339f
authored
Jul 19, 2023
by
Emmy Vouriot
Committed by
Jérome Perrin
Feb 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: Python 2 to 3 fixes
parent
093f6a65
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
6 deletions
+2
-6
product/ERP5Form/ImageField.py
product/ERP5Form/ImageField.py
+0
-1
product/ERP5OOo/FormPrintout.py
product/ERP5OOo/FormPrintout.py
+1
-1
product/ERP5OOo/OOoUtils.py
product/ERP5OOo/OOoUtils.py
+1
-4
No files found.
product/ERP5Form/ImageField.py
View file @
e2e1339f
...
@@ -145,7 +145,6 @@ class ImageFieldWidget(Widget.TextWidget):
...
@@ -145,7 +145,6 @@ class ImageFieldWidget(Widget.TextWidget):
if
value
in
(
''
,
None
):
if
value
in
(
''
,
None
):
return
None
return
None
path
=
'/'
.
join
(
REQUEST
.
physicalPathFromURL
(
value
))
path
=
'/'
.
join
(
REQUEST
.
physicalPathFromURL
(
value
))
path
=
path
.
encode
()
image_object
=
field
.
getPortalObject
().
restrictedTraverse
(
path
)
image_object
=
field
.
getPortalObject
().
restrictedTraverse
(
path
)
display
=
field
.
get_value
(
'image_display'
)
display
=
field
.
get_value
(
'image_display'
)
format
=
field
.
get_value
(
'image_format'
)
format
=
field
.
get_value
(
'image_format'
)
...
...
product/ERP5OOo/FormPrintout.py
View file @
e2e1339f
...
@@ -1107,7 +1107,7 @@ class ODGStrategy(ODFStrategy):
...
@@ -1107,7 +1107,7 @@ class ODGStrategy(ODFStrategy):
text_xpath = '//draw:frame[@draw:name="
%
s
"]' % field.id
text_xpath = '//draw:frame[@draw:name="
%
s
"]' % field.id
node_list = element_tree.xpath(text_xpath, namespaces=element_tree.nsmap)
node_list = element_tree.xpath(text_xpath, namespaces=element_tree.nsmap)
value = field.get_value('default')
value = field.get_value('default')
if isinstance(value,
str
):
if isinstance(value,
bytes
):
value = value.decode('utf-8')
value = value.decode('utf-8')
for target_node in node_list:
for target_node in node_list:
# render the field in odg xml node format
# render the field in odg xml node format
...
...
product/ERP5OOo/OOoUtils.py
View file @
e2e1339f
...
@@ -82,10 +82,7 @@ class OOoBuilder(Implicit):
...
@@ -82,10 +82,7 @@ class OOoBuilder(Implicit):
dat
=
document
.
data
dat
=
document
.
data
while
dat
is
not
None
:
while
dat
is
not
None
:
self
.
_document
.
write
(
dat
.
data
)
self
.
_document
.
write
(
dat
.
data
)
if
six
.
PY2
:
dat
=
dat
.
next
dat
=
dat
.
next
else
:
dat
=
dat
.
__next__
else
:
else
:
# Default behaviour
# Default behaviour
self
.
_document
.
write
(
document
.
data
)
self
.
_document
.
write
(
document
.
data
)
...
...
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