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
c3ad6652
Commit
c3ad6652
authored
Sep 07, 2016
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_catalog: Create erp5 catalog while setting up erp5site
parent
33d8f350
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+7
-7
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+2
-4
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
c3ad6652
...
@@ -1311,14 +1311,14 @@ class ObjectTemplateItem(BaseTemplateItem):
...
@@ -1311,14 +1311,14 @@ class ObjectTemplateItem(BaseTemplateItem):
# The id match, but better double check with the meta type
# The id match, but better double check with the meta type
# while avoiding the impact of systematic check
# while avoiding the impact of systematic check
container_container
=
portal
.
unrestrictedTraverse
(
container_path
[:
-
1
])
container_container
=
portal
.
unrestrictedTraverse
(
container_path
[:
-
1
])
if
container_container
.
meta_type
==
'ERP5 Catalog'
:
if
container_container
.
meta_type
==
'Catalog Tool'
:
container_container
.
manage_addProduct
[
'ZSQLCatalog'
].
manage_addSQLCatalog
(
id
=
container_path
[
-
1
],
title
=
''
)
container_container
.
newContent
(
portal_type
=
'Catalog'
,
id
=
container_path
[
-
1
],
title
=
''
)
# We will have more than 1 objects in portal_catalog as we are
# adding both ERP5Catalog as well as SQLCatalog object here.
# Later on, this should be changed to use only ERP5Catalog object
if
len
(
container_container
.
objectIds
())
>=
1
:
if
len
(
container_container
.
objectIds
())
>=
1
:
container_container
.
default_sql_catalog_id
=
container_path
[
-
1
]
container_container
.
setDefaultErp5CatalogId
(
container_path
[
-
1
])
container
=
portal
.
unrestrictedTraverse
(
container_path
)
elif
container_container
.
meta_type
==
'ERP5 Catalog'
:
container_container
.
manage_addProduct
[
'ZSQLCatalog'
].
manage_addSQLCatalog
(
id
=
container_path
[
-
1
],
title
=
''
)
container_container
.
default_sql_catalog_id
==
container_path
[
-
1
]
container
=
portal
.
unrestrictedTraverse
(
container_path
)
else
:
else
:
raise
raise
saved_uid_dict
=
{}
saved_uid_dict
=
{}
...
...
product/ERP5/ERP5Site.py
View file @
c3ad6652
...
@@ -2086,10 +2086,8 @@ class ERP5Generator(PortalGenerator):
...
@@ -2086,10 +2086,8 @@ class ERP5Generator(PortalGenerator):
addERP5Tool
(
p
,
'portal_caches'
,
'Cache Tool'
)
addERP5Tool
(
p
,
'portal_caches'
,
'Cache Tool'
)
addERP5Tool
(
p
,
'portal_memcached'
,
'Memcached Tool'
)
addERP5Tool
(
p
,
'portal_memcached'
,
'Memcached Tool'
)
# Add ERP5 SQL Catalog Tool
# Add erp5 catalog tool
addTool
=
p
.
manage_addProduct
[
'ERP5Catalog'
].
manage_addTool
addERP5Tool
(
p
,
'portal_catalog'
,
'Catalog Tool'
)
if
not
p
.
hasObject
(
'portal_catalog'
):
addTool
(
'ERP5 Catalog'
,
None
)
# Add Default SQL connection
# Add Default SQL connection
if
p
.
erp5_sql_connection_type
==
'Z MySQL Database Connection'
:
if
p
.
erp5_sql_connection_type
==
'Z MySQL Database Connection'
:
...
...
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