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
Alexander Emmerich
erp5
Commits
441c4fef
Commit
441c4fef
authored
Nov 16, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TemplateTool: set publication url when downloading a business template
parent
61f8f3ef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py
...plateItem/portal_components/test.erp5.testTemplateTool.py
+6
-0
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+1
-0
No files found.
bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py
View file @
441c4fef
...
@@ -104,6 +104,9 @@ class TestTemplateTool(ERP5TypeTestCase):
...
@@ -104,6 +104,9 @@ class TestTemplateTool(ERP5TypeTestCase):
self
.
assertEqual
(
test_web
.
getPortalType
(),
'Business Template'
)
self
.
assertEqual
(
test_web
.
getPortalType
(),
'Business Template'
)
self
.
assertEqual
(
test_web
.
getTitle
(),
'test_web'
)
self
.
assertEqual
(
test_web
.
getTitle
(),
'test_web'
)
self
.
assertEqual
(
len
(
test_web
.
getRevision
()),
28
)
self
.
assertEqual
(
len
(
test_web
.
getRevision
()),
28
)
self
.
assertEqual
(
test_web
.
getPublicationUrl
(),
'http://www.erp5.org/dists/snapshot/test_bt5/test_web.bt5'
)
def
_svn_setup_ssl
(
self
):
def
_svn_setup_ssl
(
self
):
"""
"""
...
@@ -139,6 +142,8 @@ class TestTemplateTool(ERP5TypeTestCase):
...
@@ -139,6 +142,8 @@ class TestTemplateTool(ERP5TypeTestCase):
self
.
assertEqual
(
test_web
.
getPortalType
(),
'Business Template'
)
self
.
assertEqual
(
test_web
.
getPortalType
(),
'Business Template'
)
self
.
assertEqual
(
test_web
.
getTitle
(),
'test_web'
)
self
.
assertEqual
(
test_web
.
getTitle
(),
'test_web'
)
self
.
assertEqual
(
len
(
test_web
.
getRevision
()),
28
)
self
.
assertEqual
(
len
(
test_web
.
getRevision
()),
28
)
self
.
assertEqual
(
test_web
.
getPublicationUrl
(),
bt5_url
)
def
test_00_updateBusinessTemplateFromUrl_simple
(
self
):
def
test_00_updateBusinessTemplateFromUrl_simple
(
self
):
"""
"""
...
@@ -549,6 +554,7 @@ class TestTemplateTool(ERP5TypeTestCase):
...
@@ -549,6 +554,7 @@ class TestTemplateTool(ERP5TypeTestCase):
bt
=
self
.
templates_tool
.
getInstalledBusinessTemplate
(
bt5_name
,
strict
=
True
)
bt
=
self
.
templates_tool
.
getInstalledBusinessTemplate
(
bt5_name
,
strict
=
True
)
self
.
assertNotEquals
(
bt
,
None
)
self
.
assertNotEquals
(
bt
,
None
)
self
.
assertEqual
(
bt
.
getTitle
(),
bt5_name
)
self
.
assertEqual
(
bt
.
getTitle
(),
bt5_name
)
self
.
assertEqual
(
bt
.
getPublicationUrl
(),
self
.
_getBTPathAndIdList
([
bt5_name
])[
0
][
0
])
# Repeat operation, the bt5 should be ignored
# Repeat operation, the bt5 should be ignored
self
.
templates_tool
.
installBusinessTemplateListFromRepository
([
bt5_name
])
self
.
templates_tool
.
installBusinessTemplateListFromRepository
([
bt5_name
])
...
...
product/ERP5/Tool/TemplateTool.py
View file @
441c4fef
...
@@ -401,6 +401,7 @@ class TemplateTool (BaseTool):
...
@@ -401,6 +401,7 @@ class TemplateTool (BaseTool):
bt = self._download_local(path, id)
bt = self._download_local(path, id)
bt.build(no_action=True)
bt.build(no_action=True)
bt.setPublicationUrl(url)
return bt
return bt
security.declareProtected('
Import
/
Export
objects
', '
importBase64EncodedText
')
security.declareProtected('
Import
/
Export
objects
', '
importBase64EncodedText
')
...
...
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