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
77969151
Commit
77969151
authored
Dec 04, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Form/Form: remove non used methods
parent
4f721c9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
57 deletions
+0
-57
product/ERP5Form/Form.py
product/ERP5Form/Form.py
+0
-57
No files found.
product/ERP5Form/Form.py
View file @
77969151
...
...
@@ -760,66 +760,9 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
raise
FormValidationError
(
errors
,
result
)
return
result
security
.
declareProtected
(
'View'
,
'hash_validated_data'
)
def
hash_validated_data
(
self
,
validated_data
):
return
hashlib
.
sha256
(
""
.
join
(
str
(
validated_data
[
key
])
for
key
in
sorted
(
validated_data
.
keys
())
if
isinstance
(
validated_data
[
key
],
(
six
.
text_type
,
six
.
binary_type
,
float
,
DateTime
)
+
six
.
integer_types
))
).
hexdigest
()
# FTP/DAV Access
manage_FTPget
=
ZMIForm
.
get_xml
def
PUT
(
self
,
REQUEST
,
RESPONSE
):
"""Handle HTTP PUT requests."""
self
.
dav__init
(
REQUEST
,
RESPONSE
)
self
.
dav__simpleifhandler
(
REQUEST
,
RESPONSE
,
refresh
=
1
)
if
REQUEST
.
environ
[
'REQUEST_METHOD'
]
!=
'PUT'
:
raise
Forbidden
(
'REQUEST_METHOD should be PUT.'
)
body
=
REQUEST
.
get
(
'BODY'
,
''
)
# Empty the form (XMLToForm is unable to empty things before reopening)
for
k
in
self
.
get_field_ids
():
try
:
self
.
_delObject
(
k
)
except
AttributeError
:
pass
self
.
groups
=
{}
self
.
group_list
=
[]
# And reimport
XMLToForm
(
body
,
self
)
self
.
ZCacheable_invalidate
()
RESPONSE
.
setStatus
(
204
)
return
RESPONSE
manage_FTPput
=
PUT
security
.
declarePrivate
(
'getSimilarSkinFolderIdList'
)
def
getSimilarSkinFolderIdList
(
self
):
"""
Find other skins id installed in the same time
"""
portal
=
self
.
getPortalObject
()
folder_id
=
self
.
aq_parent
.
id
# Find a business template which manages the context skin folder.
folder_id_set
=
{
folder_id
}
for
template
in
portal
.
portal_templates
.
getInstalledBusinessTemplateList
():
template_skin_id_list
=
template
.
getTemplateSkinIdList
()
if
folder_id
in
template_skin_id_list
:
folder_id_set
.
update
(
template_skin_id_list
)
# Find folders which can be surcharged by this skin folder
if
'_'
in
folder_id
:
surcharged_folder_id
=
'erp5_%s'
%
folder_id
.
split
(
'_'
)[
-
1
]
if
(
surcharged_folder_id
!=
folder_id
)
and
\
(
getattr
(
portal
.
portal_skins
,
surcharged_folder_id
,
None
)
\
is
not
None
):
folder_id_set
.
add
(
surcharged_folder_id
)
break
return
list
(
folder_id_set
)
#Methods for Proxify tab.
security
.
declareProtected
(
'View management screens'
,
'getFormFieldList'
)
def
getFormFieldList
(
self
):
...
...
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