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
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
alecs_myu
erp5
Commits
6ad7d6a3
Commit
6ad7d6a3
authored
Feb 04, 2016
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_dms: fix archiveVersion archives already archived document
parent
b9e8089f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml
.../document_publication_workflow/scripts/archiveVersion.xml
+3
-2
product/ERP5OOo/tests/testDms.py
product/ERP5OOo/tests/testDms.py
+6
-0
No files found.
bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml
View file @
6ad7d6a3
...
@@ -90,7 +90,7 @@ if not language:\n
...
@@ -90,7 +90,7 @@ if not language:\n
# language, we can not do anything\n
# language, we can not do anything\n
for old_document in portal_catalog(**search_kw):\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
old_document.getValidationState() in validation_state and
not old_document.getLanguage():\n
old_document.archive()\n
old_document.archive()\n
return\n
return\n
\n
\n
...
@@ -98,7 +98,8 @@ if not language:\n
...
@@ -98,7 +98,8 @@ if not language:\n
search_kw[\'language\'] = language\n
search_kw[\'language\'] = language\n
for old_document in portal_catalog(**search_kw):\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
if old_document.getValidationState() in validation_state:\n
old_document.archive()\n
]]>
</string>
</value>
]]>
</string>
</value>
...
...
product/ERP5OOo/tests/testDms.py
View file @
6ad7d6a3
...
@@ -2813,6 +2813,12 @@ return 1
...
@@ -2813,6 +2813,12 @@ return 1
self
.
assertEqual
(
'archived'
,
document_nolang_005
.
getValidationState
())
self
.
assertEqual
(
'archived'
,
document_nolang_005
.
getValidationState
())
self
.
assertEqual
(
'shared_alive'
,
document_nolang_006
.
getValidationState
())
self
.
assertEqual
(
'shared_alive'
,
document_nolang_006
.
getValidationState
())
# should ignore already archived document
document_nolang_007
=
document_nolang_006
.
Base_createCloneDocument
(
batch_mode
=
1
)
document_nolang_006
.
archive
()
document_nolang_007
.
shareAlive
()
self
.
tic
()
def
testFileWithNotDefinedMimeType
(
self
):
def
testFileWithNotDefinedMimeType
(
self
):
upload_file
=
makeFileUpload
(
'TEST-001-en.dummy'
)
upload_file
=
makeFileUpload
(
'TEST-001-en.dummy'
)
kw
=
dict
(
file
=
upload_file
,
synchronous_metadata_discovery
=
True
,
kw
=
dict
(
file
=
upload_file
,
synchronous_metadata_discovery
=
True
,
...
...
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