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
Ekaterina
erp5
Commits
175d43ad
Commit
175d43ad
authored
Oct 15, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
call InitializeClass to apply security declaration in mixins.
parent
fd1a7c2b
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
77 additions
and
2 deletions
+77
-2
product/ERP5/mixin/amount_generator.py
product/ERP5/mixin/amount_generator.py
+3
-0
product/ERP5/mixin/base_convertable.py
product/ERP5/mixin/base_convertable.py
+3
-0
product/ERP5/mixin/builder.py
product/ERP5/mixin/builder.py
+2
-0
product/ERP5/mixin/cached_convertable.py
product/ERP5/mixin/cached_convertable.py
+3
-1
product/ERP5/mixin/composition.py
product/ERP5/mixin/composition.py
+3
-0
product/ERP5/mixin/configurable.py
product/ERP5/mixin/configurable.py
+3
-0
product/ERP5/mixin/crawlable.py
product/ERP5/mixin/crawlable.py
+3
-0
product/ERP5/mixin/discoverable.py
product/ERP5/mixin/discoverable.py
+3
-0
product/ERP5/mixin/document.py
product/ERP5/mixin/document.py
+3
-0
product/ERP5/mixin/document_proxy.py
product/ERP5/mixin/document_proxy.py
+3
-0
product/ERP5/mixin/downloadable.py
product/ERP5/mixin/downloadable.py
+3
-0
product/ERP5/mixin/encrypted_password.py
product/ERP5/mixin/encrypted_password.py
+3
-0
product/ERP5/mixin/equivalence_tester.py
product/ERP5/mixin/equivalence_tester.py
+3
-0
product/ERP5/mixin/explainable.py
product/ERP5/mixin/explainable.py
+3
-0
product/ERP5/mixin/extensible_traversable.py
product/ERP5/mixin/extensible_traversable.py
+3
-1
product/ERP5/mixin/login_account_provider.py
product/ERP5/mixin/login_account_provider.py
+3
-0
product/ERP5/mixin/movement_collection_updater.py
product/ERP5/mixin/movement_collection_updater.py
+3
-0
product/ERP5/mixin/periodicity.py
product/ERP5/mixin/periodicity.py
+3
-0
product/ERP5/mixin/property_recordable.py
product/ERP5/mixin/property_recordable.py
+3
-0
product/ERP5/mixin/rule.py
product/ERP5/mixin/rule.py
+3
-0
product/ERP5/mixin/solver.py
product/ERP5/mixin/solver.py
+3
-0
product/ERP5/mixin/text_convertable.py
product/ERP5/mixin/text_convertable.py
+3
-0
product/ERP5/mixin/timer_service.py
product/ERP5/mixin/timer_service.py
+3
-0
product/ERP5/mixin/url.py
product/ERP5/mixin/url.py
+3
-0
product/ERP5/mixin/variated.py
product/ERP5/mixin/variated.py
+3
-0
product/ERP5/mixin/virtual_folder.py
product/ERP5/mixin/virtual_folder.py
+3
-0
No files found.
product/ERP5/mixin/amount_generator.py
View file @
175d43ad
...
@@ -30,6 +30,7 @@ from collections import defaultdict, deque
...
@@ -30,6 +30,7 @@ from collections import defaultdict, deque
import
random
import
random
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Acquisition
import
aq_base
,
Implicit
from
Acquisition
import
aq_base
,
Implicit
from
Products.ERP5.AggregatedAmountList
import
AggregatedAmountList
from
Products.ERP5.AggregatedAmountList
import
AggregatedAmountList
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type
import
Permissions
,
interfaces
...
@@ -541,3 +542,5 @@ class AmountGeneratorMixin:
...
@@ -541,3 +542,5 @@ class AmountGeneratorMixin:
%
(
x
.
getResourceTitle
(),
x
.
getQuantity
(),
x
.
getPrice
())
%
(
x
.
getResourceTitle
(),
x
.
getQuantity
(),
x
.
getPrice
())
for
x
in
result_list
))
for
x
in
result_list
))
return
result_list
return
result_list
InitializeClass
(
AmountGeneratorMixin
)
product/ERP5/mixin/base_convertable.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
OFS.Image
import
Pdata
from
OFS.Image
import
Pdata
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
...
@@ -98,3 +99,5 @@ class BaseConvertableFileMixin:
...
@@ -98,3 +99,5 @@ class BaseConvertableFileMixin:
file
=
StringIO
(
data
)
file
=
StringIO
(
data
)
data
,
size
=
self
.
_read_data
(
file
)
data
,
size
=
self
.
_read_data
(
file
)
self
.
_baseSetBaseData
(
data
)
self
.
_baseSetBaseData
(
data
)
InitializeClass
(
BaseConvertableFileMixin
)
product/ERP5/mixin/builder.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Core.Predicate
import
Predicate
from
Products.ERP5Type.Core.Predicate
import
Predicate
...
@@ -816,3 +817,4 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -816,3 +817,4 @@ class BuilderMixin(XMLObject, Amount, Predicate):
_deliveryLineGroupProcessing
=
_processDeliveryLineGroup
_deliveryLineGroupProcessing
=
_processDeliveryLineGroup
_deliveryCellGroupProcessing
=
_processDeliveryCellGroup
_deliveryCellGroupProcessing
=
_processDeliveryCellGroup
InitializeClass
(
BuilderMixin
)
product/ERP5/mixin/cached_convertable.py
View file @
175d43ad
...
@@ -33,8 +33,8 @@ import string
...
@@ -33,8 +33,8 @@ import string
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Cache
import
DEFAULT_CACHE_SCOPE
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
OFS.Image
import
Pdata
,
Image
as
OFSImage
from
OFS.Image
import
Pdata
,
Image
as
OFSImage
from
DateTime
import
DateTime
from
DateTime
import
DateTime
...
@@ -293,3 +293,5 @@ class CachedConvertableMixin:
...
@@ -293,3 +293,5 @@ class CachedConvertableMixin:
into the specified target format.
into the specified target format.
"""
"""
return
format
in
self
.
getTargetFormatList
()
return
format
in
self
.
getTargetFormatList
()
InitializeClass
(
CachedConvertableMixin
)
product/ERP5/mixin/composition.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Cache
import
transactional_cached
from
Products.ERP5Type.Cache
import
transactional_cached
...
@@ -256,3 +257,5 @@ class CompositionMixin:
...
@@ -256,3 +257,5 @@ class CompositionMixin:
return
specialise_list
return
specialise_list
del
asComposedDocument
# to be unhidden (and renamed ?) if needed
del
asComposedDocument
# to be unhidden (and renamed ?) if needed
InitializeClass
(
CompositionMixin
)
product/ERP5/mixin/configurable.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type.Globals
import
PersistentMapping
from
Products.ERP5Type.Globals
import
PersistentMapping
...
@@ -80,3 +81,5 @@ class ConfigurableMixin:
...
@@ -80,3 +81,5 @@ class ConfigurableMixin:
if
getattr
(
aq_base
(
self
),
'_configuration_property_dict'
,
None
)
is
None
:
if
getattr
(
aq_base
(
self
),
'_configuration_property_dict'
,
None
)
is
None
:
self
.
_configuration_property_dict
=
PersistentMapping
()
self
.
_configuration_property_dict
=
PersistentMapping
()
return
self
.
_configuration_property_dict
return
self
.
_configuration_property_dict
InitializeClass
(
ConfigurableMixin
)
product/ERP5/mixin/crawlable.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Utils
import
normaliseUrl
from
Products.ERP5Type.Utils
import
normaliseUrl
from
Products.ERP5Type.DateUtils
import
convertDateToHour
,
\
from
Products.ERP5Type.DateUtils
import
convertDateToHour
,
\
...
@@ -163,3 +164,5 @@ class CrawlableMixin:
...
@@ -163,3 +164,5 @@ class CrawlableMixin:
# if domain is empty (relative link) or domain is same, then OK
# if domain is empty (relative link) or domain is same, then OK
url_list
.
append
(
url
)
url_list
.
append
(
url
)
return
url_list
return
url_list
InitializeClass
(
CrawlableMixin
)
product/ERP5/mixin/discoverable.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
from
AccessControl.class_init
import
InitializeClass
from
ZODB.POSException
import
ConflictError
from
ZODB.POSException
import
ConflictError
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Utils
import
convertToUpperCase
from
Products.ERP5Type.Utils
import
convertToUpperCase
...
@@ -274,3 +275,5 @@ class DiscoverableMixin(CachedConvertableMixin):
...
@@ -274,3 +275,5 @@ class DiscoverableMixin(CachedConvertableMixin):
if
title_list
:
if
title_list
:
result
[
'title'
]
=
title_list
[
0
]
result
[
'title'
]
=
title_list
[
0
]
return
result
return
result
InitializeClass
(
DiscoverableMixin
)
product/ERP5/mixin/document.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
from
AccessControl
import
ClassSecurityInfo
,
Unauthorized
from
AccessControl
import
ClassSecurityInfo
,
Unauthorized
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
OFS.Image
import
Pdata
from
OFS.Image
import
Pdata
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
...
@@ -144,3 +145,5 @@ class DocumentMixin:
...
@@ -144,3 +145,5 @@ class DocumentMixin:
By default it doens't
By default it doens't
"""
"""
return
False
return
False
InitializeClass
(
DocumentMixin
)
product/ERP5/mixin/document_proxy.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
warnings
import
warn
from
warnings
import
warn
...
@@ -67,3 +68,5 @@ class DocumentProxyMixin:
...
@@ -67,3 +68,5 @@ class DocumentProxyMixin:
if
proxied_document
is
None
:
if
proxied_document
is
None
:
raise
DocumentProxyError
(
"Unable to find a proxied document"
)
raise
DocumentProxyError
(
"Unable to find a proxied document"
)
return
proxied_document
return
proxied_document
InitializeClass
(
DocumentProxyMixin
)
product/ERP5/mixin/downloadable.py
View file @
175d43ad
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#
#
##############################################################################
##############################################################################
from
AccessControl
import
ClassSecurityInfo
,
Unauthorized
from
AccessControl
import
ClassSecurityInfo
,
Unauthorized
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Utils
import
fill_args_from_request
from
Products.ERP5Type.Utils
import
fill_args_from_request
from
Products.CMFCore.utils
import
getToolByName
,
_checkConditionalGET
,
_setCacheHeaders
,
\
from
Products.CMFCore.utils
import
getToolByName
,
_checkConditionalGET
,
_setCacheHeaders
,
\
...
@@ -165,3 +166,5 @@ class DownloadableMixin:
...
@@ -165,3 +166,5 @@ class DownloadableMixin:
# pass format argument to force downloading raw content
# pass format argument to force downloading raw content
REQUEST
=
self
.
REQUEST
REQUEST
=
self
.
REQUEST
return
self
.
index_html
(
REQUEST
,
REQUEST
.
RESPONSE
,
format
=
None
)
return
self
.
index_html
(
REQUEST
,
REQUEST
.
RESPONSE
,
format
=
None
)
InitializeClass
(
DownloadableMixin
)
product/ERP5/mixin/encrypted_password.py
View file @
175d43ad
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.AuthEncoding
import
pw_encrypt
,
pw_validate
from
AccessControl.AuthEncoding
import
pw_encrypt
,
pw_validate
from
AccessControl.class_init
import
InitializeClass
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type.Globals
import
PersistentMapping
from
Products.ERP5Type.Globals
import
PersistentMapping
...
@@ -125,3 +126,5 @@ class EncryptedPasswordMixin:
...
@@ -125,3 +126,5 @@ class EncryptedPasswordMixin:
if
format
!=
'default'
:
if
format
!=
'default'
:
password
=
default_password
password
=
default_password
return
password
return
password
InitializeClass
(
EncryptedPasswordMixin
)
product/ERP5/mixin/equivalence_tester.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type.DivergenceMessage
import
DivergenceMessage
from
Products.ERP5Type.DivergenceMessage
import
DivergenceMessage
from
Products.ERP5Type.Message
import
Message
from
Products.ERP5Type.Message
import
Message
...
@@ -212,3 +213,5 @@ class EquivalenceTesterMixin:
...
@@ -212,3 +213,5 @@ class EquivalenceTesterMixin:
tested_property
=
self
.
getTestedProperty
()
tested_property
=
self
.
getTestedProperty
()
return
{
tested_property
:
self
.
_getTestedPropertyValue
(
prevision_movement
,
return
{
tested_property
:
self
.
_getTestedPropertyValue
(
prevision_movement
,
tested_property
)}
tested_property
)}
InitializeClass
(
EquivalenceTesterMixin
)
product/ERP5/mixin/explainable.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type
import
Permissions
,
interfaces
class
ExplainableMixin
:
class
ExplainableMixin
:
...
@@ -143,3 +144,5 @@ class ExplainableMixin:
...
@@ -143,3 +144,5 @@ class ExplainableMixin:
"""Returns the UID of the root explanation
"""Returns the UID of the root explanation
"""
"""
return
self
.
getRootExplanationValue
().
getUid
()
return
self
.
getRootExplanationValue
().
getUid
()
InitializeClass
(
ExplainableMixin
)
product/ERP5/mixin/extensible_traversable.py
View file @
175d43ad
...
@@ -35,6 +35,7 @@ from Products.ERP5Type.ExtensibleTraversable import ExtensibleTraversableMixIn
...
@@ -35,6 +35,7 @@ from Products.ERP5Type.ExtensibleTraversable import ExtensibleTraversableMixIn
from
Products.ERP5Type.Cache
import
getReadOnlyTransactionCache
from
Products.ERP5Type.Cache
import
getReadOnlyTransactionCache
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
,
setSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
,
setSecurityManager
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.CMFCore.utils
import
getToolByName
,
_checkConditionalGET
,
_setCacheHeaders
,
_ViewEmulator
from
Products.CMFCore.utils
import
getToolByName
,
_checkConditionalGET
,
_setCacheHeaders
,
_ViewEmulator
from
OFS.Image
import
File
as
OFSFile
from
OFS.Image
import
File
as
OFSFile
...
@@ -169,6 +170,8 @@ class BaseExtensibleTraversableMixin(ExtensibleTraversableMixIn):
...
@@ -169,6 +170,8 @@ class BaseExtensibleTraversableMixin(ExtensibleTraversableMixIn):
if
document
is
not
None
:
if
document
is
not
None
:
return
document
.
__of__
(
self
)
return
document
.
__of__
(
self
)
InitializeClass
(
BaseExtensibleTraversableMixin
)
class
DocumentExtensibleTraversableMixin
(
BaseExtensibleTraversableMixin
):
class
DocumentExtensibleTraversableMixin
(
BaseExtensibleTraversableMixin
):
"""
"""
This class provides a implementation of IExtensibleTraversable for Document classed based documents.
This class provides a implementation of IExtensibleTraversable for Document classed based documents.
...
@@ -226,4 +229,3 @@ class OOoDocumentExtensibleTraversableMixin(BaseExtensibleTraversableMixin):
...
@@ -226,4 +229,3 @@ class OOoDocumentExtensibleTraversableMixin(BaseExtensibleTraversableMixin):
if
user
is
not
None
:
if
user
is
not
None
:
setSecurityManager
(
old_manager
)
setSecurityManager
(
old_manager
)
return
document
return
document
product/ERP5/mixin/login_account_provider.py
View file @
175d43ad
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
AccessControl.AuthEncoding
import
pw_validate
from
AccessControl.AuthEncoding
import
pw_validate
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
class
LoginAccountProviderMixin
:
class
LoginAccountProviderMixin
:
"""
"""
...
@@ -113,3 +114,5 @@ class LoginAccountProviderMixin:
...
@@ -113,3 +114,5 @@ class LoginAccountProviderMixin:
if
pw_validate
(
encoded_password
,
password
):
if
pw_validate
(
encoded_password
,
password
):
return
True
return
True
return
False
return
False
InitializeClass
(
LoginAccountProviderMixin
)
product/ERP5/mixin/movement_collection_updater.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5.MovementCollectionDiff
import
(
from
Products.ERP5.MovementCollectionDiff
import
(
MovementCollectionDiff
,
_getPropertyAndCategoryList
)
MovementCollectionDiff
,
_getPropertyAndCategoryList
)
...
@@ -187,3 +188,5 @@ class MovementCollectionUpdaterMixin:
...
@@ -187,3 +188,5 @@ class MovementCollectionUpdaterMixin:
# Force update of local indexes on linked objects
# Force update of local indexes on linked objects
# (important for 'delivery').
# (important for 'delivery').
movement
.
_setCategoryList
(
categories
)
movement
.
_setCategoryList
(
categories
)
InitializeClass
(
MovementCollectionUpdaterMixin
)
product/ERP5/mixin/periodicity.py
View file @
175d43ad
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Message
import
Message
from
Products.ERP5Type.Message
import
Message
...
@@ -258,3 +259,5 @@ class PeriodicityMixin:
...
@@ -258,3 +259,5 @@ class PeriodicityMixin:
if
day
in
day_list
:
if
day
in
day_list
:
new_list
+=
[
day
]
new_list
+=
[
day
]
return
new_list
return
new_list
InitializeClass
(
PeriodicityMixin
)
product/ERP5/mixin/property_recordable.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type.Globals
import
PersistentMapping
from
Products.ERP5Type.Globals
import
PersistentMapping
...
@@ -130,3 +131,5 @@ class PropertyRecordableMixin:
...
@@ -130,3 +131,5 @@ class PropertyRecordableMixin:
def
_getRecordedPropertyDict
(
self
,
*
args
):
def
_getRecordedPropertyDict
(
self
,
*
args
):
return
getattr
(
aq_base
(
self
),
'_recorded_property_dict'
,
*
args
)
return
getattr
(
aq_base
(
self
),
'_recorded_property_dict'
,
*
args
)
InitializeClass
(
PropertyRecordableMixin
)
product/ERP5/mixin/rule.py
View file @
175d43ad
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
import
transaction
import
transaction
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type
import
Permissions
,
interfaces
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.Base
import
Base
...
@@ -607,3 +608,5 @@ class SimulableMixin(Base):
...
@@ -607,3 +608,5 @@ class SimulableMixin(Base):
for
o
in
self
.
getCausalityRelatedValueList
(
portal_type
=
'Applied Rule'
):
for
o
in
self
.
getCausalityRelatedValueList
(
portal_type
=
'Applied Rule'
):
o
.
getParentValue
().
deleteContent
(
o
.
getId
())
o
.
getParentValue
().
deleteContent
(
o
.
getId
())
super
(
SimulableMixin
,
self
).
manage_beforeDelete
(
item
,
container
)
super
(
SimulableMixin
,
self
).
manage_beforeDelete
(
item
,
container
)
InitializeClass
(
RuleMixin
)
product/ERP5/mixin/solver.py
View file @
175d43ad
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
import
zope.interface
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.UnrestrictedMethod
import
super_user
from
Products.ERP5Type.UnrestrictedMethod
import
super_user
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.XMLObject
import
XMLObject
...
@@ -116,3 +117,5 @@ class ConfigurablePropertySolverMixin(SolverMixin,
...
@@ -116,3 +117,5 @@ class ConfigurablePropertySolverMixin(SolverMixin,
portal_type
=
self
.
getPortalObject
().
portal_types
.
getTypeInfo
(
self
)
portal_type
=
self
.
getPortalObject
().
portal_types
.
getTypeInfo
(
self
)
tested_property_list
=
portal_type
.
getTestedPropertyList
()
tested_property_list
=
portal_type
.
getTestedPropertyList
()
return
tested_property_list
return
tested_property_list
InitializeClass
(
SolverMixin
)
product/ERP5/mixin/text_convertable.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
warnings
import
warn
from
warnings
import
warn
...
@@ -69,3 +70,5 @@ class TextConvertableMixin:
...
@@ -69,3 +70,5 @@ class TextConvertableMixin:
warn
(
"asTextContent() function is deprecated. Use asText() instead."
,
\
warn
(
"asTextContent() function is deprecated. Use asText() instead."
,
\
DeprecationWarning
,
stacklevel
=
2
)
DeprecationWarning
,
stacklevel
=
2
)
return
self
.
asText
(
**
kw
)
return
self
.
asText
(
**
kw
)
InitializeClass
(
TextConvertableMixin
)
product/ERP5/mixin/timer_service.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
import
warnings
import
warnings
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.CMFActivity.ActivityTool
import
ActivityTool
from
Products.CMFActivity.ActivityTool
import
ActivityTool
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
try
:
try
:
...
@@ -84,3 +85,5 @@ class TimerServiceMixin(object):
...
@@ -84,3 +85,5 @@ class TimerServiceMixin(object):
getServerAddress
=
ActivityTool
.
getServerAddress
.
im_func
getServerAddress
=
ActivityTool
.
getServerAddress
.
im_func
_isValidNodeName
=
ActivityTool
.
_isValidNodeName
.
im_func
_isValidNodeName
=
ActivityTool
.
_isValidNodeName
.
im_func
InitializeClass
(
TimerServiceMixin
)
product/ERP5/mixin/url.py
View file @
175d43ad
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
##############################################################################
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Utils
import
normaliseUrl
from
Products.ERP5Type.Utils
import
normaliseUrl
...
@@ -138,3 +139,5 @@ class UrlMixin:
...
@@ -138,3 +139,5 @@ class UrlMixin:
"""
"""
if
self
.
hasUrlString
():
if
self
.
hasUrlString
():
return
normaliseUrl
(
self
.
asURL
(),
base_url
=
base_url
)
return
normaliseUrl
(
self
.
asURL
(),
base_url
=
base_url
)
InitializeClass
(
UrlMixin
)
product/ERP5/mixin/variated.py
View file @
175d43ad
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
from
warnings
import
warn
from
warnings
import
warn
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.CMFCategory.Renderer
import
Renderer
from
Products.CMFCategory.Renderer
import
Renderer
from
Products.ERP5Type
import
interfaces
,
Permissions
,
PropertySheet
from
Products.ERP5Type
import
interfaces
,
Permissions
,
PropertySheet
import
zope.interface
import
zope.interface
...
@@ -388,3 +389,5 @@ class VariatedMixin:
...
@@ -388,3 +389,5 @@ class VariatedMixin:
category_list
=
list
(
self
.
getVariationCategoryList
())
category_list
=
list
(
self
.
getVariationCategoryList
())
category_list
.
sort
()
category_list
.
sort
()
return
'
\
n
'
.
join
(
category_list
)
return
'
\
n
'
.
join
(
category_list
)
InitializeClass
(
VariatedMixin
)
product/ERP5/mixin/virtual_folder.py
View file @
175d43ad
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
_marker
=
[]
_marker
=
[]
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
Products.ERP5Type.Core.Folder
import
Folder
from
Products.ERP5Type.Core.Folder
import
Folder
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
...
@@ -89,3 +90,5 @@ class VirtualFolderMixin:
...
@@ -89,3 +90,5 @@ class VirtualFolderMixin:
if
default
is
_marker
:
if
default
is
_marker
:
raise
raise
return
default
return
default
InitializeClass
(
VirtualFolderMixin
)
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