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
Laurent S
erp5
Commits
3ccbd091
Commit
3ccbd091
authored
Oct 26, 2011
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't create many disposable acquisition wrappers.
parent
a0096bef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
product/ERP5Type/ERP5Type.py
product/ERP5Type/ERP5Type.py
+7
-8
No files found.
product/ERP5Type/ERP5Type.py
View file @
3ccbd091
...
@@ -371,25 +371,24 @@ class ERP5TypeInformation(XMLObject,
...
@@ -371,25 +371,24 @@ class ERP5TypeInformation(XMLObject,
klass
=
portal
.
portal_types
.
getPortalTypeClass
(
klass
=
portal
.
portal_types
.
getPortalTypeClass
(
self
.
getId
(),
self
.
getId
(),
temp
=
temp_object
)
temp
=
temp_object
)
ob
=
klass
(
id
)
base_ob
=
klass
(
id
)
ob
=
base_ob
.
__of__
(
container
)
if
temp_object
:
if
temp_object
:
ob
=
ob
.
__of__
(
container
)
# Setup only Owner local role on Document like
# Setup only Owner local role on Document like
# container._setObject(set_owner=True) does.
# container._setObject(set_owner=True) does.
user_id
=
getCurrentUserIdOrAnonymousToken
()
user_id
=
getCurrentUserIdOrAnonymousToken
()
ob
.
manage_setLocalRoles
(
user_id
,
[
'Owner'
])
ob
.
manage_setLocalRoles
(
user_id
,
[
'Owner'
])
else
:
else
:
if
activate_kw
is
not
None
:
if
activate_kw
is
not
None
:
ob
.
__of__
(
container
).
setDefaultActivateParameters
(
**
activate_kw
)
ob
.
setDefaultActivateParameters
(
**
activate_kw
)
if
reindex_kw
is
not
None
:
if
reindex_kw
is
not
None
:
ob
.
__of__
(
container
).
setDefaultReindexParameters
(
**
reindex_kw
)
ob
.
setDefaultReindexParameters
(
**
reindex_kw
)
if
is_indexable
is
not
None
:
if
is_indexable
is
not
None
:
ob
.
isIndexable
=
is_indexable
base_ob
.
isIndexable
=
is_indexable
container
.
_setObject
(
id
,
ob
)
container
.
_setObject
(
id
,
base_ob
)
ob
=
container
.
_getOb
(
id
)
# if no activity tool, the object has already an uid
# if no activity tool, the object has already an uid
if
getattr
(
aq_base
(
ob
)
,
'uid'
,
None
)
is
None
:
if
getattr
(
base_ob
,
'uid'
,
None
)
is
None
:
ob
.
uid
=
portal
.
portal_catalog
.
newUid
()
ob
.
uid
=
portal
.
portal_catalog
.
newUid
()
# Portal type has to be set before setting other attributes
# Portal type has to be set before setting other attributes
...
...
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