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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Papa Tamsir Kane
erp5
Commits
b02d7575
Commit
b02d7575
authored
Aug 16, 2016
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_catalog: Create ERP5 SQL Method everywhere in Archive tool and testArchive
parent
08ae20b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
product/ERP5Catalog/Tool/ArchiveTool.py
product/ERP5Catalog/Tool/ArchiveTool.py
+1
-1
product/ERP5Catalog/tests/testArchive.py
product/ERP5Catalog/tests/testArchive.py
+3
-4
No files found.
product/ERP5Catalog/Tool/ArchiveTool.py
View file @
b02d7575
...
@@ -128,7 +128,7 @@ class ArchiveTool(BaseTool):
...
@@ -128,7 +128,7 @@ class ArchiveTool(BaseTool):
source_catalog_id
=
source_catalog
.
getId
()
source_catalog_id
=
source_catalog
.
getId
()
if
source_connection_id
is
None
or
source_deferred_connection_id
is
None
:
if
source_connection_id
is
None
or
source_deferred_connection_id
is
None
:
for
method
in
source_catalog
.
objectValues
():
for
method
in
source_catalog
.
objectValues
():
if
method
.
meta_type
==
"Z SQL Method"
:
if
method
.
meta_type
in
[
"Z SQL Method"
,
"ERP5 SQL Method"
]
:
if
source_deferred_connection_id
is
None
and
'deferred'
in
method
.
connection_id
:
if
source_deferred_connection_id
is
None
and
'deferred'
in
method
.
connection_id
:
source_deferred_connection_id
=
method
.
connection_id
source_deferred_connection_id
=
method
.
connection_id
elif
source_connection_id
is
None
and
'transactionless'
not
in
method
.
connection_id
:
elif
source_connection_id
is
None
and
'transactionless'
not
in
method
.
connection_id
:
...
...
product/ERP5Catalog/tests/testArchive.py
View file @
b02d7575
...
@@ -88,14 +88,13 @@ class TestArchive(InventoryAPITestCase):
...
@@ -88,14 +88,13 @@ class TestArchive(InventoryAPITestCase):
portal_skins_custom
=
portal
.
portal_skins
.
custom
portal_skins_custom
=
portal
.
portal_skins
.
custom
zsql_method
=
getattr
(
portal_skins_custom
,
zsql_method_id
,
None
)
zsql_method
=
getattr
(
portal_skins_custom
,
zsql_method_id
,
None
)
if
zsql_method
is
None
:
if
zsql_method
is
None
:
portal_skins_custom
.
manage_addProduct
[
'ZSQLMethods'
]
\
zsql_method
=
portal_skins_custom
.
newContent
(
\
.
manage_addZSQLMethod
(
portal_type
=
'SQL Method'
,
id
=
zsql_method_id
,
id
=
zsql_method_id
,
title
=
''
,
title
=
''
,
connection_id
=
connection_id
,
connection_id
=
connection_id
,
arguments
=
""
,
arguments
=
""
,
template
=
"select path from catalog"
)
src
=
"select path from catalog"
)
zsql_method
=
portal_skins_custom
[
zsql_method_id
]
zsql_method
.
max_rows_
=
0
zsql_method
.
max_rows_
=
0
# it is mandatory to provide connection_id, or the
# it is mandatory to provide connection_id, or the
# zsql method will look at preference and use the one
# zsql method will look at preference and use the one
...
...
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