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
Aurélien Vermylen
erp5
Commits
fd327ab4
Commit
fd327ab4
authored
Feb 06, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filesystem bt5 Extension are stored as strings in bt5 (backward compatibility).
parent
cb9d762a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+16
-10
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
fd327ab4
...
@@ -3792,20 +3792,26 @@ class ExtensionTemplateItem(FilesystemToZodbTemplateItem):
...
@@ -3792,20 +3792,26 @@ class ExtensionTemplateItem(FilesystemToZodbTemplateItem):
obj
.
text_content
=
f
.
read
()
obj
.
text_content
=
f
.
read
()
def
export
(
self
,
context
,
bta
,
**
kw
):
def
export
(
self
,
context
,
bta
,
**
kw
):
path
=
self
.
__class__
.
__name__
path
=
self
.
__class__
.
__name__
+
'/'
for
key
,
obj
in
self
.
_objects
.
iteritems
():
for
key
,
obj
in
self
.
_objects
.
iteritems
():
obj
=
obj
.
_getCopy
(
context
)
# Back compatibility with filesystem Extensions
if
isinstance
(
obj
,
str
):
if
not
key
.
startswith
(
path
):
key
=
path
+
key
bta
.
addObject
(
obj
,
name
=
key
,
ext
=
'.py'
)
else
:
obj
=
obj
.
_getCopy
(
context
)
f
=
StringIO
(
obj
.
text_content
)
f
=
StringIO
(
obj
.
text_content
)
bta
.
addObject
(
f
,
key
,
path
=
path
,
ext
=
'.py'
)
bta
.
addObject
(
f
,
key
,
path
=
path
,
ext
=
'.py'
)
del
obj
.
text_content
del
obj
.
text_content
transaction
.
commit
()
transaction
.
commit
()
# export object in xml
# export object in xml
f
=
StringIO
()
f
=
StringIO
()
XMLExportImport
.
exportXML
(
obj
.
_p_jar
,
obj
.
_p_oid
,
f
)
XMLExportImport
.
exportXML
(
obj
.
_p_jar
,
obj
.
_p_oid
,
f
)
bta
.
addObject
(
f
,
key
,
path
=
path
)
bta
.
addObject
(
f
,
key
,
path
=
path
)
@
staticmethod
@
staticmethod
def
_getZodbObjectId
(
id
):
def
_getZodbObjectId
(
id
):
...
...
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