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
1
Issues
1
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
Roque
erp5
Commits
cc26793c
Commit
cc26793c
authored
Jul 13, 2012
by
Arnaud Fontaine
Committed by
Łukasz Nowak
Jul 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate Components upon bt5 installation.
(cherry picked from commit 583d5b149312d7c4cd45e58bc1793fc02722f559)
parent
93731edc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+5
-0
product/ERP5/tests/testBusinessTemplate.py
product/ERP5/tests/testBusinessTemplate.py
+8
-4
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
cc26793c
...
...
@@ -4022,6 +4022,11 @@ class DocumentTemplateItem(FilesystemToZodbTemplateItem):
if
self
.
_is_already_migrated
(
object_list
):
ObjectTemplateItem
.
install
(
self
,
context
,
**
kw
)
portal
=
context
.
getPortalObject
()
for
object_path
in
object_list
:
obj
=
portal
.
unrestrictedTraverse
(
object_path
)
obj
.
validate
()
self
.
portal_components
.
reset
(
force
=
True
,
reset_portal_type
=
True
)
else
:
FilesystemDocumentTemplateItem
.
install
(
self
,
context
,
**
kw
)
...
...
product/ERP5/tests/testBusinessTemplate.py
View file @
cc26793c
...
...
@@ -7003,10 +7003,14 @@ class TestDocumentTemplateItem(BusinessTemplateMixin):
self
.
getPortalObject
().
portal_components
.
deleteContent
(
sequence
[
'document_id'
])
def
stepCheckZodbDocumentExists
(
self
,
sequence
=
None
,
**
kw
):
def
stepCheckZodbDocumentExists
AndValidated
(
self
,
sequence
=
None
,
**
kw
):
self
.
assertHasAttribute
(
self
.
getPortalObject
().
portal_components
,
sequence
[
'document_id'
])
self
.
assertEquals
(
getattr
(
self
.
getPortalObject
().
portal_components
,
sequence
[
'document_id'
]).
getValidationState
(),
'validated'
)
def
stepCheckZodbDocumentRemoved
(
self
,
sequence
=
None
,
**
kw
):
component_tool
=
self
.
getPortalObject
().
portal_components
self
.
failIf
(
sequence
[
'document_id'
]
in
component_tool
.
objectIds
())
...
...
@@ -7074,7 +7078,7 @@ class TestDocumentTemplateItem(BusinessTemplateMixin):
CheckBuiltBuildingState
\
CheckNoTrashBin
\
CheckSkinsLayers
\
CheckZodbDocumentExists
\
CheckZodbDocumentExists
AndValidated
\
UninstallBusinessTemplate
\
CheckBuiltBuildingState
\
CheckNotInstalledInstallationState
\
...
...
@@ -7139,7 +7143,7 @@ class TestDocumentTemplateItem(BusinessTemplateMixin):
CheckBuiltBuildingState
\
CheckNoTrashBin
\
CheckSkinsLayers
\
CheckZodbDocumentExists
\
CheckZodbDocumentExists
AndValidated
\
UninstallBusinessTemplate
\
CheckBuiltBuildingState
\
CheckNotInstalledInstallationState
\
...
...
@@ -7254,7 +7258,7 @@ class TestDocumentTemplateItem(BusinessTemplateMixin):
InstallWithoutForceBusinessTemplate
\
Tic
\
\
CheckZodbDocumentExists
\
CheckZodbDocumentExists
AndValidated
\
CheckInstalledInstallationState
\
CheckBuiltBuildingState
\
\
...
...
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