Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
a78070a3
Commit
a78070a3
authored
Mar 29, 2017
by
Ayush Tiwari
Committed by
Ayush Tiwari
Nov 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Import should work for separated property objects also
parent
14830f17
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+8
-9
No files found.
product/ERP5/Document/BusinessManager.py
View file @
a78070a3
...
@@ -1136,25 +1136,24 @@ class BusinessItem(Implicit, Persistent):
...
@@ -1136,25 +1136,24 @@ class BusinessItem(Implicit, Persistent):
connection
=
self
.
getConnection
(
parent
)
connection
=
self
.
getConnection
(
parent
)
__traceback_info__
=
'Importing %s'
%
file_name
__traceback_info__
=
'Importing %s'
%
file_name
obj
=
connection
.
importFile
(
file_obj
,
customImporters
=
customImporters
)
obj
=
connection
.
importFile
(
file_obj
,
customImporters
=
customImporters
)
self
.
_value
=
obj
data
=
getTransactionalVariable
().
get
(
transactional_variable_obj_key
)
if
data
is
not
None
:
self
.
_restoreSeparatelyExportedProperty
(
obj
,
data
)
elif
file_ext
!=
'.xml'
:
elif
file_ext
!=
'.xml'
:
# For ZODB Components: if .xml have been processed before, set the
# For ZODB Components: if .xml have been processed before, set the
# source code property, otherwise store it in a transactional variable
# source code property, otherwise store it in a transactional variable
# so that it can be set once the .xml has been processed
# so that it can be set once the .xml has been processed
data
=
file_obj
.
read
()
data
=
file_obj
.
read
()
try
:
item
=
parent
.
getBusinessItemByPath
(
obj_key
)
obj
=
self
.
_objects
[
obj_key
]
obj
=
item
.
_value
except
KeyError
:
if
obj
is
None
:
getTransactionalVariable
()[
transactional_variable_obj_key
]
=
data
getTransactionalVariable
()[
transactional_variable_obj_key
]
=
data
else
:
else
:
self
.
_restoreSeparatelyExportedProperty
(
obj
,
data
)
self
.
_restoreSeparatelyExportedProperty
(
obj
,
data
)
self
.
_value
=
obj
data
=
getTransactionalVariable
().
get
(
transactional_variable_obj_key
)
if
data
is
not
None
:
self
.
_restoreSeparatelyExportedProperty
(
obj
,
data
)
def
_restoreSeparatelyExportedProperty
(
self
,
obj
,
data
):
def
_restoreSeparatelyExportedProperty
(
self
,
obj
,
data
):
unicode_data
,
property_name
=
SEPARATELY_EXPORTED_PROPERTY_DICT
[
unicode_data
,
property_name
=
SEPARATELY_EXPORTED_PROPERTY_DICT
[
obj
.
__class__
.
__name__
][
1
:]
obj
.
__class__
.
__name__
][
1
:]
...
...
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