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
Paul Graydon
erp5
Commits
e617bcdb
Commit
e617bcdb
authored
Feb 07, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: py3
parent
3c3c5c74
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 @
e617bcdb
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
Generate a HTML Summary of an object.
Generate a HTML Summary of an object.
Use "No ZODB" approach if possible.
Use "No ZODB" approach if possible.
"""
"""
import
six
request
=
context
.
REQUEST
request
=
context
.
REQUEST
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
is_temp_object
=
context
.
isTempObject
()
is_temp_object
=
context
.
isTempObject
()
...
@@ -40,7 +41,7 @@ else:
...
@@ -40,7 +41,7 @@ else:
modification_date
=
context
.
modification_date
modification_date
=
context
.
modification_date
document_web_section_list
=
web_site
.
getWebSectionValueList
(
context
)
document_web_section_list
=
web_site
.
getWebSectionValueList
(
context
)
inline_popup
=
context
.
Document_getPopupInfo
(
web_site
,
document_web_section_list
)
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'
)
inline_popup
=
inline_popup
.
encode
(
'utf-8'
)
found
=
context
.
Base_showFoundText
()
found
=
context
.
Base_showFoundText
()
portal_type
=
context
.
getTranslatedPortalType
()
portal_type
=
context
.
getTranslatedPortalType
()
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
View file @
e617bcdb
...
@@ -37,7 +37,7 @@ from hashlib import md5
...
@@ -37,7 +37,7 @@ from hashlib import md5
skipped_workflow_id_list
=
[
'delivery_causality_workflow'
,]
skipped_workflow_id_list
=
[
'delivery_causality_workflow'
,]
def
generateUid
(
portal_type
,
workflow_id
,
workflow_state
):
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
):
def
getDocumentGroupByWorkflowStateList
(
self
,
form_id
=
''
,
**
kw
):
"""This returns the list of all "document groups", ie document of the same
"""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 @
e617bcdb
...
@@ -24,7 +24,7 @@ else:
...
@@ -24,7 +24,7 @@ else:
request
=
container
.
REQUEST
request
=
container
.
REQUEST
request_form
=
request
.
form
request_form
=
request
.
form
for
k
in
request_form
.
keys
(
):
for
k
in
list
(
request_form
):
del
request_form
[
k
]
del
request_form
[
k
]
request
.
form
.
update
(
old_request
)
request
.
form
.
update
(
old_request
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getConversionFormatItemList.py
View file @
e617bcdb
...
@@ -4,5 +4,5 @@ td = context.newContent(
...
@@ -4,5 +4,5 @@ td = context.newContent(
portal_type
=
'OOo Document'
,
portal_type
=
'OOo Document'
,
temp_object
=
True
,
temp_object
=
True
,
base_content_type
=
base_content_type
,
base_content_type
=
base_content_type
,
base_data
=
'not empty'
)
base_data
=
b
'not empty'
)
return
[(
''
,
''
)]
+
td
.
getTargetFormatItemList
()
return
[(
''
,
''
)]
+
td
.
getTargetFormatItemList
()
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.py
View file @
e617bcdb
...
@@ -18,9 +18,13 @@ if is_gadget_mode:
...
@@ -18,9 +18,13 @@ if is_gadget_mode:
def
getRandomDocumentTextExcerpt
(
document_text
):
def
getRandomDocumentTextExcerpt
(
document_text
):
# try to get somewhat arbitrary choice of searchable attrs
# try to get somewhat arbitrary choice of searchable attrs
if
isinstance
(
document_text
,
str
)
and
document_text
!=
''
:
if
isinstance
(
document_text
,
str
)
and
document_text
!=
''
:
if
six
.
PY2
:
document_text
=
document_text
.
decode
(
encoding
,
'ignore'
)
document_text
=
document_text
.
decode
(
encoding
,
'ignore'
)
start
=
min
(
len
(
document_text
)
-
300
,
200
)
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
:
else
:
return
''
return
''
...
@@ -54,6 +58,7 @@ else:
...
@@ -54,6 +58,7 @@ else:
result
=
' '
.
join
(
map
(
str
,
found_text_fragments
))
result
=
' '
.
join
(
map
(
str
,
found_text_fragments
))
# Document may contains charactors which utf8 codec cannot decode.
# Document may contains charactors which utf8 codec cannot decode.
if
six
.
PY2
:
unicode_result
=
result
.
decode
(
encoding
,
'ignore'
)
unicode_result
=
result
.
decode
(
encoding
,
'ignore'
)
result
=
unicode_result
.
encode
(
encoding
)
result
=
unicode_result
.
encode
(
encoding
)
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_filter.py
View file @
e617bcdb
...
@@ -21,10 +21,10 @@ else:
...
@@ -21,10 +21,10 @@ else:
else
:
else
:
filtered_uid_dict
[
uid
]
=
1
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
.
checkAll
(
selection_name
,
uids
,
REQUEST
=
None
)
selection_tool
.
setSelectionToIds
(
selection_name
,
selection_tool
.
setSelectionToIds
(
selection_name
,
filtered_uid_dict
.
keys
(
),
REQUEST
=
request
)
list
(
filtered_uid_dict
),
REQUEST
=
request
)
url
=
selection_tool
.
getSelectionListUrlFor
(
url
=
selection_tool
.
getSelectionListUrlFor
(
selection_name
,
REQUEST
=
request
)
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