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
Labels
Merge Requests
137
Merge Requests
137
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
2b6a12f2
Commit
2b6a12f2
authored
Feb 19, 2016
by
Sebastien Robin
Committed by
Georgios Dagkakis
Mar 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
template tool: API should allows to export a single business template
parent
0a9bb62e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+4
-2
No files found.
product/ERP5/Tool/TemplateTool.py
View file @
2b6a12f2
...
@@ -469,7 +469,8 @@ class TemplateTool (BaseTool):
...
@@ -469,7 +469,8 @@ class TemplateTool (BaseTool):
else:
else:
shutil.rmtree(file_object_path)
shutil.rmtree(file_object_path)
def _importAndReExportBusinessTemplate(self, template_path):
security.declareProtected( '
Import
/
Export
objects
', '
importAndReExportBusinessTemplateFromPath
' )
def importAndReExportBusinessTemplateFromPath(self, template_path):
"""
"""
Imports the template that is in the template_path and exports it to the
Imports the template that is in the template_path and exports it to the
same path.
same path.
...
@@ -525,7 +526,8 @@ class TemplateTool (BaseTool):
...
@@ -525,7 +526,8 @@ class TemplateTool (BaseTool):
if not os.path.exists((os.path.join(template_path, '
bt
'))):
if not os.path.exists((os.path.join(template_path, '
bt
'))):
LOG(business_template_id,0,'
has
no
bt
sub
-
folder
,
so
it
is
skipped
')
LOG(business_template_id,0,'
has
no
bt
sub
-
folder
,
so
it
is
skipped
')
else:
else:
self.activate(activity='
SQLQueue
')._importAndReExportBusinessTemplate(template_path)
self.activate(activity='
SQLQueue
').
\
importAndReExportBusinessTemplateFromPath(template_path)
security.declareProtected(Permissions.ManagePortal, '
getFilteredDiff
')
security.declareProtected(Permissions.ManagePortal, '
getFilteredDiff
')
def getFilteredDiff(self, diff):
def getFilteredDiff(self, diff):
...
...
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