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
1f2d8a66
Commit
1f2d8a66
authored
Feb 08, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BusinessTemplate: py3 ( obj.data with old bt )
parent
457e62a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+6
-0
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
1f2d8a66
...
...
@@ -1528,6 +1528,12 @@ class ObjectTemplateItem(BaseTemplateItem):
container
.
getParentValue
().
updateCache
()
elif
obj
.
__class__
.
__name__
in
(
'File'
,
'Image'
):
if
"data"
in
obj
.
__dict__
:
# XXX when installing very old business templates without the data stored
# in a separate file (such as the one from
# testTemplateTool.TestTemplateTool.test_updateBusinessTemplateFromUrl_keep_list)
# data might be loaded as a string, fix this here.
if
not
isinstance
(
obj
.
data
,
(
bytes
,
Pdata
)):
obj
.
data
=
obj
.
data
.
encode
()
# XXX Calling obj._setData() would call Interaction Workflow such
# as document_conversion_interaction_workflow which would update
# mime_type too...
...
...
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