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
Georgios Dagkakis
erp5
Commits
b947037f
Commit
b947037f
authored
Nov 01, 2015
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: ignore business template dependencies in update, just like in install.
parent
8f165c65
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getModifiedObject.xml
...al_skins/erp5_core/BusinessTemplate_getModifiedObject.xml
+2
-2
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+4
-2
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
b947037f
...
@@ -5029,7 +5029,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
...
@@ -5029,7 +5029,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
return
modified_object_list
return
modified_object_list
def
_install
(
self
,
force
=
1
,
object_to_update
=
None
,
update_translation
=
0
,
def
_install
(
self
,
force
=
1
,
object_to_update
=
None
,
update_translation
=
0
,
update_catalog
=
False
,
**
kw
):
update_catalog
=
False
,
check_dependencies
=
True
,
**
kw
):
"""
"""
Install a new Business Template, if force, all will be upgraded or installed
Install a new Business Template, if force, all will be upgraded or installed
otherwise depends of dict object_to_update
otherwise depends of dict object_to_update
...
@@ -5052,7 +5052,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
...
@@ -5052,7 +5052,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
if
trash_tool
is
None
:
if
trash_tool
is
None
:
raise
AttributeError
,
'Trash Tool is not installed'
raise
AttributeError
,
'Trash Tool is not installed'
if
not
force
:
if
not
force
and
check_dependencies
:
self
.
checkDependencies
()
self
.
checkDependencies
()
# always created a trash bin because we may to save object already present
# always created a trash bin because we may to save object already present
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_getModifiedObject.xml
View file @
b947037f
...
@@ -55,7 +55,7 @@ from Products.ERP5Type.Cache import CachingMethod\n
...
@@ -55,7 +55,7 @@ from Products.ERP5Type.Cache import CachingMethod\n
Base_translateString = context.Base_translateString\n
Base_translateString = context.Base_translateString\n
\n
\n
def getModifiedObjectList(context):\n
def getModifiedObjectList(context):\n
result = context.preinstall()\n
result = context.preinstall(
check_dependencies=check_dependencies
)\n
return result\n
return result\n
\n
\n
def cacheIdGenerator(method_id, *args, **kw):\n
def cacheIdGenerator(method_id, *args, **kw):\n
...
@@ -126,7 +126,7 @@ return object_list\n
...
@@ -126,7 +126,7 @@ return object_list\n
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
<value>
<string>
check_dependencies=True,
**kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
b947037f
...
@@ -905,13 +905,15 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
...
@@ -905,13 +905,15 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
install_kw
=
None
install_kw
=
None
if
get_install_kw
:
if
get_install_kw
:
install_kw
=
{}
install_kw
=
{}
listbox_object_list
=
BusinessTemplate_getModifiedObject
.
__of__
(
bt
)()
listbox_object_list
=
BusinessTemplate_getModifiedObject
.
__of__
(
bt
)(
check_dependencies
=
False
)
for
listbox_line
in
listbox_object_list
:
for
listbox_line
in
listbox_object_list
:
install_kw
[
listbox_line
.
object_id
]
=
listbox_line
.
choice_item_list
[
0
][
1
]
install_kw
[
listbox_line
.
object_id
]
=
listbox_line
.
choice_item_list
[
0
][
1
]
bt
.
install
(
light_install
=
light_install
,
bt
.
install
(
light_install
=
light_install
,
object_to_update
=
install_kw
,
object_to_update
=
install_kw
,
update_catalog
=
bt
.
isCatalogUpdatable
(),
update_catalog
=
bt
.
isCatalogUpdatable
(),
update_translation
=
1
)
update_translation
=
1
,
check_dependencies
=
False
)
# Release locks
# Release locks
self
.
commit
()
self
.
commit
()
if
not
quiet
:
if
not
quiet
:
...
...
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