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
alecs_myu
erp5
Commits
b999ac04
Commit
b999ac04
authored
Apr 14, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: _path_item_list should be PersistentList
parent
bfcbe492
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+11
-10
No files found.
product/ERP5/Document/BusinessManager.py
View file @
b999ac04
...
...
@@ -39,6 +39,7 @@ import fnmatch
import
re
import
threading
import
pprint
from
copy
import
deepcopy
from
collections
import
defaultdict
from
cStringIO
import
StringIO
...
...
@@ -49,19 +50,22 @@ from OFS import SimpleItem, XMLExportImport
from
datetime
import
datetime
from
itertools
import
chain
from
operator
import
attrgetter
from
persistent.list
import
PersistentList
from
AccessControl
import
ClassSecurityInfo
,
Unauthorized
,
getSecurityManager
from
Acquisition
import
Implicit
,
aq_base
,
aq_inner
,
aq_parent
from
zLOG
import
LOG
,
INFO
,
WARNING
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.CMFCore.utils
import
getToolByName
from
Products.PythonScripts.PythonScript
import
PythonScript
from
Products.ERP5Type.dynamic.lazy_class
import
ERP5BaseBroken
from
Products.ERP5Type.Globals
import
Persistent
,
PersistentMapping
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
AccessControl
import
ClassSecurityInfo
,
Unauthorized
,
getSecurityManager
from
Acquisition
import
Implicit
,
aq_base
,
aq_inner
,
aq_parent
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
zLOG
import
LOG
,
INFO
,
WARNING
from
Products.ERP5Type.patches.ppml
import
importXML
from
Products.ERP5Type.Accessor.Constant
import
PropertyGetter
as
ConstantGetter
customImporters
=
{
XMLExportImport
.
magic
:
importXML
,
}
...
...
@@ -236,17 +240,14 @@ class BusinessManager(XMLObject):
final_prop_map
=
prop_map
+
self
.
_properties
return
final_prop_map
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'export'
)
def
export
(
self
,
path
=
None
,
local
=
0
,
bma
=
None
,
**
kw
):
"""
Export the object
XXX: Are we planning to use something like archive for saving the exported
objects inside a Business Manager
Export the object as zexp file
"""
if
not
self
.
getStatus
()
==
'built'
:
raise
ValueError
,
'Manager not built properly'
f
=
StringIO
()
self
.
_p_jar
.
exportFile
(
self
.
_p_oid
,
f
)
# XXX: Improve naming
...
...
@@ -277,7 +278,7 @@ class BusinessManager(XMLObject):
connection
=
self
.
aq_parent
.
_p_jar
file
=
open
(
path
,
'rb'
)
obj
=
connection
.
importFile
(
file
)
self
.
_path_item_list
=
obj
.
_path_item_list
self
.
_path_item_list
=
obj
.
_path_item_list
[:]
self
.
_setTemplatePathList
(
obj
.
getTemplatePathList
())
def
__add__
(
self
,
other
):
...
...
@@ -319,7 +320,7 @@ class BusinessManager(XMLObject):
"""
portal
=
self
.
getPortalObject
()
LOG
(
'Business Manager'
,
INFO
,
'Storing Manager Data'
)
self
.
_path_item_list
=
[]
self
.
_path_item_list
=
PersistentList
()
path_item_list
=
self
.
getTemplatePathList
()
if
path_item_list
:
...
...
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