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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
fe7a66eb
Commit
fe7a66eb
authored
May 31, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
simple fixes from python3 port
See merge request
nexedi/erp5!1941
parents
0b8b8475
79d55baf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
+11
-12
bt5/erp5_base/ModuleComponentTemplateItem/portal_components/module.erp5.ImageUtil.py
...ntTemplateItem/portal_components/module.erp5.ImageUtil.py
+6
-2
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
...portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
+1
-6
bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.zpt
...plateItem/portal_skins/erp5_ods_style/field_ods_macro.zpt
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getConversionFormatItemList.py
...ortal_skins/erp5_core/Base_getConversionFormatItemList.py
+2
-2
No files found.
bt5/erp5_base/ModuleComponentTemplateItem/portal_components/module.erp5.ImageUtil.py
View file @
fe7a66eb
...
...
@@ -65,6 +65,10 @@ def transformUrlToDataURI(content):
if
url_value
.
startswith
(
"http"
):
image
.
set
(
xlink_href
,
getDataURI
(
image
.
get
(
xlink_href
)))
return
"""<?xml version="1.0" encoding="UTF-8" standalone="no"?>
\
n
"""
+
\
etree
.
tostring
(
root
)
return
etree
.
tostring
(
root
,
encoding
=
"utf-8"
,
xml_declaration
=
True
,
standalone
=
"no"
,
)
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
View file @
fe7a66eb
...
...
@@ -12,7 +12,6 @@ There are runtime values hidden in every dialog form (injected by getHateoas Scr
extra_param_json - JSON serialized extra parameters for the dialog script
"""
from
erp5.component.module.Log
import
log
,
WARNING
from
Products.Formulator.Errors
import
FormValidationError
import
json
import
six
...
...
@@ -137,7 +136,7 @@ try:
return
context
.
Base_renderForm
(
dialog_id
,
message
=
translate
(
'Only ODT, ODS, Hal and HalRestricted skins are allowed for reports '
\
'in Preferences - User Interface - Report Style'
),
level
=
WARNING
,
level
=
'warning'
,
form_data
=
form_data
)
except
FormValidationError
as
validation_errors
:
...
...
@@ -180,10 +179,6 @@ for field in form.get_fields():
if
len
(
listbox_id_list
):
# Warn if there are more than one listbox in form ...
if
len
(
listbox_id_list
)
>
1
:
log
(
'Base_callDialogMethod'
,
'There are %s listboxes in form %s.'
%
(
len
(
listbox_id_list
),
form
.
id
))
# ... but handle them anyway.
for
listbox_id
in
listbox_id_list
:
listbox_line_list
=
[]
listbox
=
kw
[
listbox_id
]
...
...
bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/field_ods_macro.zpt
View file @
fe7a66eb
...
...
@@ -147,7 +147,7 @@
</tal:block>
<tal:block tal:condition="python: field is not None">
<tal:block tal:condition="python:field.meta_type=='DateTimeField' or (field.meta_type == 'ProxyField' and field.getRecursiveTemplateField().meta_type == 'DateTimeField')">
<tal:block tal:condition="python:field.get_value('date_only')" tal:define="input_order python:field.get_value('input_order')">
<tal:block tal:condition="python:field.get_value('date_only')" tal:define="input_order python:field.get_value('input_order')
or 'ymd'
">
<table:table-cell tal:attributes="office:date-value python: context.ERP5Site_formatDateForODF(value);
table:style-name string:${style_prefix}date_${input_order};"
table:style-name="date"
...
...
@@ -155,7 +155,7 @@
<text:p tal:content="python: field.render_pdf(value)"/>
</table:table-cell>
</tal:block>
<tal:block tal:condition="python:not field.get_value('date_only')" tal:define="input_order python:field.get_value('input_order')">
<tal:block tal:condition="python:not field.get_value('date_only')" tal:define="input_order python:field.get_value('input_order')
or 'ymd'
">
<table:table-cell tal:attributes="office:date-value python: context.ERP5Site_formatDateForODF(value);
table:style-name string:${style_prefix}date_with_time_${input_order};"
table:style-name="date_with_time"
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getConversionFormatItemList.py
View file @
fe7a66eb
...
...
@@ -4,5 +4,5 @@ td = context.newContent(
portal_type
=
'OOo Document'
,
temp_object
=
True
,
base_content_type
=
base_content_type
,
base_data
=
'not empty'
)
return
[(
''
,
''
)]
+
td
.
getTargetFormatItemList
(
)
base_data
=
b
'not empty'
)
return
[(
''
,
''
)]
+
sorted
(
td
.
getTargetFormatItemList
()
)
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