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
preetwinder
erp5
Commits
fd1a7c2b
Commit
fd1a7c2b
authored
Oct 08, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manage_afterAdd, manage_afterClone and manage_beforeDelete should be private.
parent
fe3a1740
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
7 deletions
+21
-7
product/CMFActivity/ActivityTool.py
product/CMFActivity/ActivityTool.py
+3
-1
product/ERP5/Document/BaseCategory.py
product/ERP5/Document/BaseCategory.py
+1
-0
product/ERP5/Document/Bug.py
product/ERP5/Document/Bug.py
+1
-0
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+1
-1
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+1
-0
product/ERP5/mixin/rule.py
product/ERP5/mixin/rule.py
+2
-0
product/ERP5/mixin/timer_service.py
product/ERP5/mixin/timer_service.py
+2
-2
product/ERP5Banking/Document/BankingOperation.py
product/ERP5Banking/Document/BankingOperation.py
+2
-1
product/ERP5Type/CopySupport.py
product/ERP5Type/CopySupport.py
+3
-0
product/Formulator/Field.py
product/Formulator/Field.py
+2
-2
product/ZMySQLDA/DA.py
product/ZMySQLDA/DA.py
+3
-0
No files found.
product/CMFActivity/ActivityTool.py
View file @
fd1a7c2b
...
@@ -798,10 +798,12 @@ class ActivityTool (Folder, UniqueObject):
...
@@ -798,10 +798,12 @@ class ActivityTool (Folder, UniqueObject):
url
+=
urllib
.
quote
(
'Cancel and invoke links visible'
)
url
+=
urllib
.
quote
(
'Cancel and invoke links visible'
)
RESPONSE
.
redirect
(
url
)
RESPONSE
.
redirect
(
url
)
security
.
declarePrivate
(
'manage_beforeDelete'
)
def
manage_beforeDelete
(
self
,
item
,
container
):
def
manage_beforeDelete
(
self
,
item
,
container
):
self
.
unsubscribe
()
self
.
unsubscribe
()
Folder
.
inheritedAttribute
(
'manage_beforeDelete'
)(
self
,
item
,
container
)
Folder
.
inheritedAttribute
(
'manage_beforeDelete'
)(
self
,
item
,
container
)
security
.
declarePrivate
(
'manage_afterAdd'
)
def
manage_afterAdd
(
self
,
item
,
container
):
def
manage_afterAdd
(
self
,
item
,
container
):
self
.
subscribe
()
self
.
subscribe
()
Folder
.
inheritedAttribute
(
'manage_afterAdd'
)(
self
,
item
,
container
)
Folder
.
inheritedAttribute
(
'manage_afterAdd'
)(
self
,
item
,
container
)
...
...
product/ERP5/Document/BaseCategory.py
View file @
fd1a7c2b
...
@@ -66,6 +66,7 @@ class BaseCategory(CMFBaseCategory, XMLObject):
...
@@ -66,6 +66,7 @@ class BaseCategory(CMFBaseCategory, XMLObject):
#result.extend(self.portal_catalog())
#result.extend(self.portal_catalog())
return
result
return
result
security
.
declarePrivate
(
'manage_afterAdd'
)
def
manage_afterAdd
(
self
,
item
,
container
):
def
manage_afterAdd
(
self
,
item
,
container
):
"""
"""
Reset Accessors
Reset Accessors
...
...
product/ERP5/Document/Bug.py
View file @
fd1a7c2b
...
@@ -55,6 +55,7 @@ class Bug(Ticket):
...
@@ -55,6 +55,7 @@ class Bug(Ticket):
,
PropertySheet
.
Bug
,
PropertySheet
.
Bug
)
)
security
.
declarePrivate
(
'manage_afterClone'
)
def
manage_afterClone
(
self
,
item
):
def
manage_afterClone
(
self
,
item
):
Ticket
.
manage_afterClone
(
self
,
item
)
Ticket
.
manage_afterClone
(
self
,
item
)
# delete existing bug lines
# delete existing bug lines
...
...
product/ERP5/Document/BusinessTemplate.py
View file @
fd1a7c2b
...
@@ -4789,7 +4789,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
...
@@ -4789,7 +4789,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
XMLObject
.
__init__
(
self
,
*
args
,
**
kw
)
XMLObject
.
__init__
(
self
,
*
args
,
**
kw
)
self
.
_clean
()
self
.
_clean
()
security
.
declarePr
otected
(
Permissions
.
ManagePortal
,
'manage_afterAdd'
)
security
.
declarePr
ivate
(
'manage_afterAdd'
)
def
manage_afterAdd
(
self
,
item
,
container
):
def
manage_afterAdd
(
self
,
item
,
container
):
"""
"""
This is called when a new business template is added or imported.
This is called when a new business template is added or imported.
...
...
product/ERP5/ERP5Site.py
View file @
fd1a7c2b
...
@@ -364,6 +364,7 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
...
@@ -364,6 +364,7 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
return
self
return
self
security
.
declarePrivate
(
'manage_beforeDelete'
)
def
manage_beforeDelete
(
self
,
item
,
container
):
def
manage_beforeDelete
(
self
,
item
,
container
):
# skin is setup during __before_publishing_traverse__, which
# skin is setup during __before_publishing_traverse__, which
# doesn't happen when the object is being deleted from the management
# doesn't happen when the object is being deleted from the management
...
...
product/ERP5/mixin/rule.py
View file @
fd1a7c2b
...
@@ -474,6 +474,7 @@ class RuleMixin(Predicate):
...
@@ -474,6 +474,7 @@ class RuleMixin(Predicate):
class
SimulableMixin
(
Base
):
class
SimulableMixin
(
Base
):
security
=
ClassSecurityInfo
()
def
updateSimulation
(
self
,
**
kw
):
def
updateSimulation
(
self
,
**
kw
):
"""Create/update related simulation trees by activity
"""Create/update related simulation trees by activity
...
@@ -600,6 +601,7 @@ class SimulableMixin(Base):
...
@@ -600,6 +601,7 @@ class SimulableMixin(Base):
return
applied_rule
return
applied_rule
raise
SimulationError
(
"No such rule as %r is found"
%
rule_reference
)
raise
SimulationError
(
"No such rule as %r is found"
%
rule_reference
)
security
.
declarePrivate
(
'manage_beforeDelete'
)
def
manage_beforeDelete
(
self
,
item
,
container
):
def
manage_beforeDelete
(
self
,
item
,
container
):
"""Delete related Applied Rule"""
"""Delete related Applied Rule"""
for
o
in
self
.
getCausalityRelatedValueList
(
portal_type
=
'Applied Rule'
):
for
o
in
self
.
getCausalityRelatedValueList
(
portal_type
=
'Applied Rule'
):
...
...
product/ERP5/mixin/timer_service.py
View file @
fd1a7c2b
...
@@ -68,12 +68,12 @@ class TimerServiceMixin(object):
...
@@ -68,12 +68,12 @@ class TimerServiceMixin(object):
return
"Usubscribed from Timer Service"
return
"Usubscribed from Timer Service"
return
"TimerService not available"
return
"TimerService not available"
security
.
declarePr
otected
(
Permissions
.
ManageProperties
,
'manage_beforeDelete'
)
security
.
declarePr
ivate
(
'manage_beforeDelete'
)
def
manage_beforeDelete
(
self
,
*
args
,
**
kw
):
def
manage_beforeDelete
(
self
,
*
args
,
**
kw
):
self
.
unsubscribe
()
self
.
unsubscribe
()
super
(
TimerServiceMixin
,
self
).
manage_beforeDelete
(
*
args
,
**
kw
)
super
(
TimerServiceMixin
,
self
).
manage_beforeDelete
(
*
args
,
**
kw
)
security
.
declarePr
otected
(
Permissions
.
ManageProperties
,
'manage_afterAdd'
)
security
.
declarePr
ivate
(
'manage_afterAdd'
)
def
manage_afterAdd
(
self
,
*
args
,
**
kw
):
def
manage_afterAdd
(
self
,
*
args
,
**
kw
):
self
.
unsubscribe
()
self
.
unsubscribe
()
super
(
TimerServiceMixin
,
self
).
manage_afterAdd
(
*
args
,
**
kw
)
super
(
TimerServiceMixin
,
self
).
manage_afterAdd
(
*
args
,
**
kw
)
...
...
product/ERP5Banking/Document/BankingOperation.py
View file @
fd1a7c2b
...
@@ -65,6 +65,7 @@ class BankingOperation(BaobabMixin, AccountingTransaction):
...
@@ -65,6 +65,7 @@ class BankingOperation(BaobabMixin, AccountingTransaction):
,
PropertySheet
.
Amount
,
PropertySheet
.
Amount
)
)
security
.
declarePrivate
(
'manage_beforeDelete'
)
def
manage_beforeDelete
(
self
,
item
,
container
):
def
manage_beforeDelete
(
self
,
item
,
container
):
"""
"""
The right of deleting must be define by workflows
The right of deleting must be define by workflows
...
...
product/ERP5Type/CopySupport.py
View file @
fd1a7c2b
...
@@ -234,6 +234,7 @@ class CopyContainer:
...
@@ -234,6 +234,7 @@ class CopyContainer:
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
return
self
.
manage_main
(
self
,
REQUEST
,
update_menu
=
1
)
# Copy and paste support
# Copy and paste support
security
.
declarePrivate
(
'manage_afterClone'
)
def
manage_afterClone
(
self
,
item
):
def
manage_afterClone
(
self
,
item
):
"""
"""
Add self to the workflow.
Add self to the workflow.
...
@@ -316,6 +317,7 @@ class CopyContainer:
...
@@ -316,6 +317,7 @@ class CopyContainer:
script
()
script
()
security
.
declarePrivate
(
'manage_afterAdd'
)
def
manage_afterAdd
(
self
,
item
,
container
):
def
manage_afterAdd
(
self
,
item
,
container
):
"""
"""
Add self to the catalog.
Add self to the catalog.
...
@@ -328,6 +330,7 @@ class CopyContainer:
...
@@ -328,6 +330,7 @@ class CopyContainer:
if
getattr
(
self
,
'isIndexable'
,
1
):
if
getattr
(
self
,
'isIndexable'
,
1
):
self
.
__recurse
(
'manage_afterAdd'
,
item
,
container
)
self
.
__recurse
(
'manage_afterAdd'
,
item
,
container
)
security
.
declarePrivate
(
'manage_beforeDelete'
)
def
manage_beforeDelete
(
self
,
item
,
container
):
def
manage_beforeDelete
(
self
,
item
,
container
):
"""
"""
Remove self from the catalog.
Remove self from the catalog.
...
...
product/Formulator/Field.py
View file @
fd1a7c2b
...
@@ -554,7 +554,7 @@ class ZMIField(
...
@@ -554,7 +554,7 @@ class ZMIField(
getattr
(
self
,
method_name
)(
values
[
key
])
getattr
(
self
,
method_name
)(
values
[
key
])
security
.
declarePr
otected
(
'Change Formulator Forms'
,
'manage_beforeDelete'
)
security
.
declarePr
ivate
(
'manage_beforeDelete'
)
def
manage_beforeDelete
(
self
,
item
,
container
):
def
manage_beforeDelete
(
self
,
item
,
container
):
"""Remove name from list if object is deleted.
"""Remove name from list if object is deleted.
"""
"""
...
@@ -562,7 +562,7 @@ class ZMIField(
...
@@ -562,7 +562,7 @@ class ZMIField(
if
hasattr
(
item
.
aq_explicit
,
'is_field'
):
if
hasattr
(
item
.
aq_explicit
,
'is_field'
):
container
.
field_removed
(
item
.
id
)
container
.
field_removed
(
item
.
id
)
security
.
declarePr
otected
(
'Change Formulator Forms'
,
'manage_afterAdd'
)
security
.
declarePr
ivate
(
'manage_afterAdd'
)
def
manage_afterAdd
(
self
,
item
,
container
):
def
manage_afterAdd
(
self
,
item
,
container
):
"""What happens when we add a field.
"""What happens when we add a field.
"""
"""
...
...
product/ZMySQLDA/DA.py
View file @
fd1a7c2b
...
@@ -99,6 +99,7 @@ from App.ImageFile import ImageFile
...
@@ -99,6 +99,7 @@ from App.ImageFile import ImageFile
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
.
import
DABase
from
.
import
DABase
from
.db
import
DB
,
DeferredDB
from
.db
import
DB
,
DeferredDB
from
AccessControl
import
ClassSecurityInfo
SHARED_DC_ZRDB_LOCATION
=
os
.
path
.
dirname
(
Shared
.
DC
.
ZRDB
.
__file__
)
SHARED_DC_ZRDB_LOCATION
=
os
.
path
.
dirname
(
Shared
.
DC
.
ZRDB
.
__file__
)
...
@@ -132,6 +133,7 @@ class Connection(DABase.Connection):
...
@@ -132,6 +133,7 @@ class Connection(DABase.Connection):
id
=
'%s_database_connection'
%
database_type
id
=
'%s_database_connection'
%
database_type
meta_type
=
title
=
'Z %s Database Connection'
%
database_type
meta_type
=
title
=
'Z %s Database Connection'
%
database_type
icon
=
'misc_/Z%sDA/conn'
%
database_type
icon
=
'misc_/Z%sDA/conn'
%
database_type
security
=
ClassSecurityInfo
()
manage_properties
=
HTMLFile
(
'connectionEdit'
,
globals
())
manage_properties
=
HTMLFile
(
'connectionEdit'
,
globals
())
...
@@ -139,6 +141,7 @@ class Connection(DABase.Connection):
...
@@ -139,6 +141,7 @@ class Connection(DABase.Connection):
def
factory
(
self
):
return
DB
def
factory
(
self
):
return
DB
security
.
declarePrivate
(
'manage_beforeDelete'
)
def
manage_beforeDelete
(
self
,
item
,
container
):
def
manage_beforeDelete
(
self
,
item
,
container
):
database_connection_pool
.
get
(
self
.
_p_oid
,
{}).
pop
(
self
.
_p_jar
,
None
)
database_connection_pool
.
get
(
self
.
_p_oid
,
{}).
pop
(
self
.
_p_jar
,
None
)
...
...
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