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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
eb218b6e
Commit
eb218b6e
authored
Jan 23, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not archive current document.
parent
4a4db8e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml
.../document_publication_workflow/scripts/archiveVersion.xml
+7
-2
bt5/erp5_dms/bt/revision
bt5/erp5_dms/bt/revision
+1
-1
No files found.
bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml
View file @
eb218b6e
...
@@ -66,19 +66,24 @@ if not reference:\n
...
@@ -66,19 +66,24 @@ if not reference:\n
portal = document.getPortalObject()\n
portal = document.getPortalObject()\n
portal_catalog = portal.portal_catalog\n
portal_catalog = portal.portal_catalog\n
language = document.getLanguage()\n
language = document.getLanguage()\n
search_kw = dict(reference=reference,\n
validation_state=validation_state,\n
# exclude current workflow changed document\n
uid=\'NOT %s\' %document.getUid())\n
if not language:\n
if not language:\n
# If language is None, we have to check is this document\n
# If language is None, we have to check is this document\n
# is language independent. In this case, archival is possible\n
# is language independent. In this case, archival is possible\n
# But if a document exists with same reference and defined\n
# But if a document exists with same reference and defined\n
# language, we can not do anything\n
# language, we can not do anything\n
for old_document in portal_catalog(
reference=reference, validation_state=validation_state
):\n
for old_document in portal_catalog(
**search_kw
):\n
old_document = old_document.getObject()\n
old_document = old_document.getObject()\n
if not old_document.getLanguage():\n
if not old_document.getLanguage():\n
old_document.archive()\n
old_document.archive()\n
return\n
return\n
\n
\n
# We can now archive all documents with same reference and language in published state\n
# We can now archive all documents with same reference and language in published state\n
for old_document in portal_catalog(reference=reference, language=language, validation_state=validation_state):\n
search_kw[\'language\'] = language\n
for old_document in portal_catalog(**search_kw):\n
old_document = old_document.getObject()\n
old_document = old_document.getObject()\n
old_document.archive()\n
old_document.archive()\n
</string>
</value>
</string>
</value>
...
...
bt5/erp5_dms/bt/revision
View file @
eb218b6e
1262
1263
\ No newline at end of file
\ 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