Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
4681d8c2
Commit
4681d8c2
authored
Jan 16, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move check to one place in code.
parent
71185457
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
...g/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
+1
-3
bt5/erp5_dms_conversion_catalog/SkinTemplateItem/portal_skins/erp5_dms_conversion_catalog/Base_callPreConvert.xml
...skins/erp5_dms_conversion_catalog/Base_callPreConvert.xml
+6
-0
bt5/erp5_dms_conversion_catalog/bt/revision
bt5/erp5_dms_conversion_catalog/bt/revision
+1
-1
No files found.
bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
View file @
4681d8c2
...
...
@@ -62,11 +62,9 @@ if address not in MARKER and port not in MARKER:\n
for index_uid in range(len(uid)):\n
document_relative_url = getRelativeUrl[index_uid]\n
document = portal.restrictedTraverse(document_relative_url)\n
allowed_portal_type_list = portal.getPortalDocumentTypeList() + portal.getPortalEmbeddedDocumentTypeList()\n
# XXX: we do check if "data" methods exists on pretending to be Document portal types\n
# we need a way to do this by introspection\n
if document.getPortalType() in allowed_portal_type_list and \\\n
((getattr(document, "getData", None) is not None and document.getData() not in MARKER) or \\\n
if ((getattr(document, "getData", None) is not None and document.getData() not in MARKER) or \\\n
(getattr(document, "getBaseData", None) is not None and document.getBaseData() not in MARKER)):\n
document.activate(serialize_tag="conversion").Base_callPreConvert()\n
</string>
</value>
...
...
bt5/erp5_dms_conversion_catalog/SkinTemplateItem/portal_skins/erp5_dms_conversion_catalog/Base_callPreConvert.xml
View file @
4681d8c2
...
...
@@ -57,6 +57,12 @@
portal = context.getPortalObject()\n
\n
portal_type = context.getPortalType()\n
allowed_portal_type_list = portal.getPortalDocumentTypeList() + portal.getPortalEmbeddedDocumentTypeList()\n
\n
if portal_type not in allowed_portal_type_list:\n
# no need to convert any non DMS types\n
return\n
\n
format = portal.portal_preferences.getPreferredImageFormat()\n
quality = portal.portal_preferences.getPreferredImageQuality()\n
preferred_image_size = portal.portal_preferences.getPreferredImageSize()\n
...
...
bt5/erp5_dms_conversion_catalog/bt/revision
View file @
4681d8c2
13
\ No newline at end of file
14
\ No newline at end of file
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