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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
ef505eab
Commit
ef505eab
authored
Jan 12, 2017
by
Tristan Cavelier
Committed by
Xiaowu Zhang
Aug 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XXX hack on ?format=... base format on OOoDocument
parent
a72fd424
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
bt5/erp5_base/DocumentTemplateItem/portal_components/document.erp5.OOoDocument.py
...mplateItem/portal_components/document.erp5.OOoDocument.py
+12
-1
No files found.
bt5/erp5_base/DocumentTemplateItem/portal_components/document.erp5.OOoDocument.py
View file @
ef505eab
...
...
@@ -281,8 +281,19 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
requires_pdf_first
=
0
original_format
=
format
allowed_format_list
=
self
.
getTargetFormatList
()
if
format
==
'base-data'
:
##### BEGIN hack to get the base data value on ?format=... XXX##
portal_type
=
self
.
getPortalType
()
if
(
format
==
'base-data'
or
(
format
,
portal_type
)
in
(
(
"odt"
,
"Text"
),
(
"ods"
,
"Spreadsheet"
),
(
"odp"
,
"Presentation"
),
)):
return
self
.
getBaseContentType
(),
str
(
self
.
getBaseData
())
#if format == 'base-data':
# return self.getBaseContentType(), str(self.getBaseData())
##### END hack to get the base data value on ?format=... #####
if
format
==
'pdf'
:
format_list
=
[
x
for
x
in
allowed_format_list
if
x
.
endswith
(
'pdf'
)]
...
...
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