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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
6a972bfc
Commit
6a972bfc
authored
Feb 07, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: py3
parent
7792bd1e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
10 deletions
+16
-10
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSummaryAsHTML.py
...plateItem/portal_skins/erp5_base/Base_getSummaryAsHTML.py
+2
-1
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
...al_components/extension.erp5.FolderWorkflowActionUtils.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editRelation.py
...nTemplateItem/portal_skins/erp5_core/Base_editRelation.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getConversionFormatItemList.py
...ortal_skins/erp5_core/Base_getConversionFormatItemList.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.py
...TemplateItem/portal_skins/erp5_core/Base_showFoundText.py
+9
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_filter.py
.../SkinTemplateItem/portal_skins/erp5_core/Folder_filter.py
+2
-2
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Base_getSummaryAsHTML.py
View file @
6a972bfc
...
...
@@ -2,6 +2,7 @@
Generate a HTML Summary of an object.
Use "No ZODB" approach if possible.
"""
import
six
request
=
context
.
REQUEST
portal
=
context
.
getPortalObject
()
is_temp_object
=
context
.
isTempObject
()
...
...
@@ -40,7 +41,7 @@ else:
modification_date
=
context
.
modification_date
document_web_section_list
=
web_site
.
getWebSectionValueList
(
context
)
inline_popup
=
context
.
Document_getPopupInfo
(
web_site
,
document_web_section_list
)
if
isinstance
(
inline_popup
,
unicode
):
if
six
.
PY2
and
not
isinstance
(
inline_popup
,
str
):
inline_popup
=
inline_popup
.
encode
(
'utf-8'
)
found
=
context
.
Base_showFoundText
()
portal_type
=
context
.
getTranslatedPortalType
()
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
View file @
6a972bfc
...
...
@@ -37,7 +37,7 @@ from hashlib import md5
skipped_workflow_id_list
=
[
'delivery_causality_workflow'
,]
def
generateUid
(
portal_type
,
workflow_id
,
workflow_state
):
return
'new_'
+
md5
(
'%s/%s/%s'
%
(
portal_type
,
workflow_id
,
workflow_state
)).
hexdigest
()
return
'new_'
+
md5
(
(
'%s/%s/%s'
%
(
portal_type
,
workflow_id
,
workflow_state
)).
encode
(
)).
hexdigest
()
def
getDocumentGroupByWorkflowStateList
(
self
,
form_id
=
''
,
**
kw
):
"""This returns the list of all "document groups", ie document of the same
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editRelation.py
View file @
6a972bfc
...
...
@@ -24,7 +24,7 @@ else:
request
=
container
.
REQUEST
request_form
=
request
.
form
for
k
in
request_form
.
keys
(
):
for
k
in
list
(
request_form
):
del
request_form
[
k
]
request
.
form
.
update
(
old_request
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getConversionFormatItemList.py
View file @
6a972bfc
...
...
@@ -4,5 +4,5 @@ td = context.newContent(
portal_type
=
'OOo Document'
,
temp_object
=
True
,
base_content_type
=
base_content_type
,
base_data
=
'not empty'
)
base_data
=
b
'not empty'
)
return
[(
''
,
''
)]
+
td
.
getTargetFormatItemList
()
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.py
View file @
6a972bfc
...
...
@@ -18,9 +18,13 @@ if is_gadget_mode:
def
getRandomDocumentTextExcerpt
(
document_text
):
# try to get somewhat arbitrary choice of searchable attrs
if
isinstance
(
document_text
,
str
)
and
document_text
!=
''
:
if
six
.
PY2
:
document_text
=
document_text
.
decode
(
encoding
,
'ignore'
)
start
=
min
(
len
(
document_text
)
-
300
,
200
)
return
'... %s ...'
%
document_text
[
start
:
start
+
max_text_length
].
encode
(
encoding
)
result
=
'... %s ...'
%
document_text
[
start
:
start
+
max_text_length
]
if
six
.
PY2
:
result
=
result
.
encode
(
encoding
)
return
result
else
:
return
''
...
...
@@ -54,6 +58,7 @@ else:
result
=
' '
.
join
(
map
(
str
,
found_text_fragments
))
# Document may contains charactors which utf8 codec cannot decode.
if
six
.
PY2
:
unicode_result
=
result
.
decode
(
encoding
,
'ignore'
)
result
=
unicode_result
.
encode
(
encoding
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_filter.py
View file @
6a972bfc
...
...
@@ -21,10 +21,10 @@ else:
else
:
filtered_uid_dict
[
uid
]
=
1
if
len
(
filtered_uid_dict
.
keys
()
)
>
0
:
if
len
(
filtered_uid_dict
)
>
0
:
selection_tool
.
checkAll
(
selection_name
,
uids
,
REQUEST
=
None
)
selection_tool
.
setSelectionToIds
(
selection_name
,
filtered_uid_dict
.
keys
(
),
REQUEST
=
request
)
list
(
filtered_uid_dict
),
REQUEST
=
request
)
url
=
selection_tool
.
getSelectionListUrlFor
(
selection_name
,
REQUEST
=
request
)
...
...
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