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
Titouan Soulard
erp5
Commits
e9511377
Commit
e9511377
authored
Oct 16, 2012
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use upgradeSite API to install Business Templates
parent
e8e449fc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
22 deletions
+11
-22
bt5/erp5_promise/SkinTemplateItem/portal_skins/erp5_promise/Alarm_checkPromiseBt5.xml
...eItem/portal_skins/erp5_promise/Alarm_checkPromiseBt5.xml
+7
-15
bt5/erp5_promise/SkinTemplateItem/portal_skins/erp5_promise/Alarm_installPromiseBt5.xml
...tem/portal_skins/erp5_promise/Alarm_installPromiseBt5.xml
+3
-6
bt5/erp5_promise/bt/revision
bt5/erp5_promise/bt/revision
+1
-1
No files found.
bt5/erp5_promise/SkinTemplateItem/portal_skins/erp5_promise/Alarm_checkPromiseBt5.xml
View file @
e9511377
...
...
@@ -62,20 +62,12 @@ if bt5 is None:\n
\n
active_result = ActiveResult()\n
\n
template_tool.updateRepositoryBusinessTemplateList(
\n
template_tool.getRepository
List())\n
bt5_list = bt5.split()
\n
bt5_list.extend(template_tool.getInstalledBusinessTemplateTitle
List())\n
\n
try:\n
bt5_list = [x[1] for x in template_tool.resolveBusinessTemplateListDependency(\n
bt5.split(),\n
newest_only=True)]\n
\n
bt5_list.extend([x.getTitle() for x in \\\n
template_tool.getUpdatedRepositoryBusinessTemplateList()])\n
\n
bt5_list = list(set(bt5_list))\n
severity = len(bt5_list)\n
\n
message_list = template_tool.upgradeSite(bt5_list, dry_run=True)\n
severity = len(message_list)\n
except BusinessTemplateUnknownError, error:\n
severity = -1\n
detail = str(error)\n
...
...
@@ -83,13 +75,13 @@ except BusinessTemplateUnknownError, error:\n
if severity == -1:\n
severity = 5\n
summary = "Unable to resolve bt5 dependencies"\n
\n
elif severity == 0:\n
summary = "Nothing to do."\n
detail = ""\n
else:\n
summary = "Upgrade needed"\n
detail = "Needed to install %s" % \', \'.join(bt5_list)\n
summary = "Upgrade needed."\n
detail = "Information: %s" % ",".join(message_list)\n
\n
\n
active_result.edit(\n
summary=summary, \n
...
...
bt5/erp5_promise/SkinTemplateItem/portal_skins/erp5_promise/Alarm_installPromiseBt5.xml
View file @
e9511377
...
...
@@ -56,12 +56,9 @@ bt5 = portal.getPromiseParameter(\'portal_templates\', \'expected_bt5\')\n
if bt5 is None:\n
return\n
\n
bt5_list = [x[1] for x in portal.portal_templates.resolveBusinessTemplateListDependency(bt5.split(), newest_only=True)]\n
bt5_list.extend([x.getTitle() for x in portal.portal_templates.getUpdatedRepositoryBusinessTemplateList()])\n
bt5_list = list(set(bt5_list))\n
\n
portal.portal_templates.installBusinessTemplateListFromRepository(\n
bt5_list, activate=True, install_dependency=True)\n
bt5_list = bt5.split()\n
bt5_list.extend(portal.portal_templates.getInstalledBusinessTemplateTitleList())\n
portal.portal_templates.upgradeSite(bt5_list)\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_promise/bt/revision
View file @
e9511377
18
\ No newline at end of file
19
\ No newline at end of file
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