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
146
Merge Requests
146
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
4301022c
Commit
4301022c
authored
Nov 23, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
b9a33c40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
product/ERP5/Document/File.py
product/ERP5/Document/File.py
+3
-0
product/ERP5Type/dynamic/portal_type_class.py
product/ERP5Type/dynamic/portal_type_class.py
+7
-4
No files found.
product/ERP5/Document/File.py
View file @
4301022c
...
...
@@ -28,6 +28,7 @@
##############################################################################
from
DateTime
import
DateTime
from
io
import
BytesIO
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type.Base
import
WorkflowMethod
from
Products.ERP5Type
import
Permissions
,
PropertySheet
...
...
@@ -102,6 +103,8 @@ class File(Document, OFS_File):
"""
if
'file'
in
kw
:
file_object
=
kw
.
pop
(
'file'
)
if
type
(
file_object
)
is
bytes
:
file_object
=
BytesIO
(
file_object
)
filename
=
getattr
(
file_object
,
'filename'
,
None
)
# if file field is empty(no file is uploaded),
# filename is empty string.
...
...
product/ERP5Type/dynamic/portal_type_class.py
View file @
4301022c
...
...
@@ -465,11 +465,14 @@ def synchronizeDynamicModules(context, force=False):
assert
tool
.
_p_changed
migrate
=
True
for
porta
l_id
in
(
"portal_properties"
,
"portal_uidannotation"
,
"portal_uidgenerator"
,
"portal_uidhandler"
):
if
portal
.
hasObject
(
porta
l_id
):
portal
.
_delObject
(
porta
l_id
,
suppress_events
=
True
)
for
too
l_id
in
(
"portal_properties"
,
"portal_uidannotation"
,
"portal_uidgenerator"
,
"portal_uidhandler"
):
if
portal
.
hasObject
(
too
l_id
):
portal
.
_delObject
(
too
l_id
,
suppress_events
=
True
)
migrate
=
True
if
tool_id
==
'portal_properties'
:
portal
.
portal_skins
.
erp5_xhtml_style
.
breadcrumbs
.
write
(
'return []'
)
if
migrate
:
portal
.
migrateToPortalTypeClass
()
...
...
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