Commit 00b1c64d authored by Arnaud Fontaine's avatar Arnaud Fontaine

${SR_DIRECTORY}/bin/python -c 'from zope.fixers.main import main;...

${SR_DIRECTORY}/bin/python -c 'from zope.fixers.main import main; main("--write --nobackups parts/erp5/".split())'
parent 1cd73f91
......@@ -36,6 +36,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
"""
Payment Rule generates payment simulation movement from invoice
......@@ -49,11 +52,6 @@ class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties
property_sheets = (
PropertySheet.Base,
......
......@@ -31,8 +31,9 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import PropertySheet, Permissions, interfaces
from Products.ERP5Type.Core.Predicate import Predicate
from zope.interface import implements
from zope.interface import implementer
@implementer( interfaces.IPredicate,)
class Archive(Predicate):
"""
A Catalog Archive object
......@@ -47,9 +48,6 @@ class Archive(Predicate):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
implements( interfaces.IPredicate, )
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -37,6 +37,7 @@ import re
_marker = object()
@zope.interface.implementer(ICoordinate,)
class Coordinate(Base):
"""
Coordinates is a mix-in class which is used to store elementary
......@@ -81,9 +82,6 @@ class Coordinate(Base):
portal_type = 'Coordinate'
add_permission = Permissions.AddPortalContent
# Declarative interface
zope.interface.implements(ICoordinate, )
# Declarative security (replaces __ac_permissions__)
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -33,6 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
@zope.interface.implementer(interfaces.INode)
class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin):
"""Login
"""
......@@ -40,8 +41,6 @@ class Login(EncryptedPasswordMixin, XMLObject, LoginAccountProviderMixin):
portal_type = 'Login'
add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.interface.IMovementGroup import IMovementGroup
import zope.interface
@zope.interface.implementer( IMovementGroup,)
class MovementGroup(XMLObject):
"""
The purpose of MovementGroup is to define how movements
......@@ -59,8 +60,6 @@ class MovementGroup(XMLObject):
meta_type = 'ERP5 Movement Group'
portal_type = 'Movement Group'
zope.interface.implements( IMovementGroup, )
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Node import Node
@zope.interface.implementer(interfaces.INode)
class Organisation(Node):
"""
An Organisation object holds the information about
......@@ -52,8 +53,6 @@ class Organisation(Node):
portal_type = 'Organisation'
add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -60,6 +60,7 @@ class UserExistsError(
super(UserExistsError, self).__init__('user id %s already exists' % (user_id, ))
@zope.interface.implementer(interfaces.INode)
class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMixin):
"""
An Person object holds the information about
......@@ -81,8 +82,6 @@ class Person(EncryptedPasswordMixin, Node, LoginAccountProviderMixin, ERP5UserMi
portal_type = 'Person'
add_permission = Permissions.AddPortalContent
zope.interface.implements(interfaces.INode)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -32,6 +32,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.ERP5Type \
import ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT
@zope.interface.implementer(interfaces.ILocalRoleGenerator)
class RoleDefinition(XMLObject):
# CMF Type Definition
meta_type = 'ERP5 Role Definition'
......@@ -42,8 +43,6 @@ class RoleDefinition(XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(interfaces.ILocalRoleGenerator)
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -39,6 +39,7 @@ from Products.ERP5Type.Globals import PersistentMapping
from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.exceptions import AccessControl_Unauthorized
@zope.interface.implementer(IEncryptedPassword,)
class EncryptedPasswordMixin(object):
"""Encrypted Password Mixin
"""
......@@ -46,9 +47,6 @@ class EncryptedPasswordMixin(object):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IEncryptedPassword,)
security.declareProtected(Permissions.SetOwnPassword, 'checkPassword')
def checkPassword(self, value) :
"""
......
......@@ -35,6 +35,7 @@ from AccessControl.AuthEncoding import pw_validate
from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass
@zope.interface.implementer(ILoginAccountProvider)
class LoginAccountProviderMixin:
"""
This class provides a generic implementation of ILoginAccountProvider.
......@@ -43,9 +44,6 @@ class LoginAccountProviderMixin:
# Declarative security
security = ClassSecurityInfo()
# Declarative interfaces
zope.interface.implements(ILoginAccountProvider)
security.declareProtected(Permissions.SetOwnPassword, 'notifyLoginFailure')
def notifyLoginFailure(self, **kw):
"""
......
# -*- coding: utf-8 -*-
from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements
from zope.interface import implementer
from erp5.component.document.Document import DocumentConversionServerProxy, ConversionError, enc, dec
@implementer(ITransform)
class DocumentConversionServerTransform:
"""
Transformer using Conversion Server
"""
implements(ITransform)
# Name of the Transform as registered in portal_transforms
__name__ = None
......
......@@ -41,6 +41,7 @@ ROUNDING_OPTION_DICT = {'ROUND_DOWN':ROUND_DOWN,
'ROUND_HALF_EVEN':ROUND_HALF_EVEN,
'ROUND_HALF_UP':ROUND_HALF_UP}
@zope.interface.implementer(IRoundingTool)
class RoundingTool(BaseTool):
"""Rounding Tool"""
id = 'portal_roundings'
......@@ -48,8 +49,6 @@ class RoundingTool(BaseTool):
meta_type = 'ERP5 Rounding Tool'
portal_type = 'Rounding Tool'
zope.interface.implements(IRoundingTool)
security = ClassSecurityInfo()
security.declarePublic('findRoundingModelValueList')
......
......@@ -39,6 +39,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin):
""" """
# CMF Type Definition
......@@ -49,11 +52,6 @@ class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin)
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties
property_sheets = (
PropertySheet.Base,
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Accounting Account. """
......@@ -48,9 +49,6 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Accounting Period. """
......@@ -47,9 +48,6 @@ class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Purchase Trade Conditions. """
......@@ -48,9 +49,6 @@ class AdvancedPurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLO
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Sale Trade Conditions. """
......@@ -48,9 +49,6 @@ class AdvancedSaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObjec
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
from DateTime import DateTime
@zope.interface.implementer(IConfiguratorItem)
class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup an Alarm """
......@@ -48,9 +49,6 @@ class AlarmConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup bank account. """
......@@ -49,9 +50,6 @@ class BankAccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Rules. """
......@@ -48,9 +49,6 @@ class BusinessProcessConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Set up catalog keyword keys."""
......@@ -48,9 +49,6 @@ class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -40,6 +40,7 @@ class UnrestrictedStringIO(StringIO):
__allow_access_to_unprotected_subobjects__ = 1
@zope.interface.implementer(IConfiguratorItem)
class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Import a categories spreadsheet.
"""
......@@ -54,9 +55,6 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""This class is meta build step for customization of ERP5 site."""
......@@ -47,9 +48,6 @@ class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup currency. """
......@@ -48,9 +49,6 @@ class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -33,6 +33,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Create a new bt5 for customer configuration.
......@@ -49,9 +50,6 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" This class install a Organisation."""
......@@ -49,9 +50,6 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Set permission matrix on module."""
......@@ -47,9 +48,6 @@ class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -37,6 +37,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
""" Setup user. """
......@@ -50,9 +51,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Configure Portal Type."""
......@@ -47,9 +48,6 @@ class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Import a portal type roles spreadsheet.
"""
......@@ -48,9 +49,6 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup preference. """
......@@ -47,9 +48,6 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Purchase Trade Conditions. """
......@@ -48,9 +49,6 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -36,6 +36,7 @@ from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
from zLOG import LOG, INFO
@zope.interface.implementer(IConfiguratorItem)
class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup role per module basis. """
......@@ -49,9 +50,6 @@ class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Rules. """
......@@ -47,9 +48,6 @@ class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Sale Trade Conditions. """
......@@ -48,9 +49,6 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -35,6 +35,7 @@ from erp5.component.mixin.SkinConfiguratorItemMixin import \
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin,
XMLObject):
""" Setup the ERP5Type_getSecurityCategoryMapping Python Script which
......@@ -50,9 +51,6 @@ class SecurityCategoryMappingConfiguratorItem(SkinConfiguratorItemMixin,
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -36,6 +36,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Create default service documents."""
......@@ -49,9 +50,6 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
"""Set up site properties."""
......@@ -47,9 +48,6 @@ class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup Solvers. """
......@@ -47,9 +48,6 @@ class SolverConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -36,6 +36,7 @@ from Products.ERP5Type.Cache import CachingMethod
from zLOG import LOG, INFO
@zope.interface.implementer(IConfiguratorItem)
class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" This class will install standard ERP5 template from a repository to
fake site. """
......@@ -50,9 +51,6 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -34,6 +34,7 @@ from erp5.component.mixin.ConfiguratorItemMixin import ConfiguratorItemMixin
from erp5.component.interface.IConfiguratorItem import IConfiguratorItem
@zope.interface.implementer(IConfiguratorItem)
class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
""" Setup System preference. """
......@@ -47,9 +48,6 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -53,9 +53,9 @@ if 1: # BBB
from zope.i18n.interfaces import ITranslationDomain, \
IFallbackTranslationDomainFactory
@zope.interface.implementer(ITranslationDomain)
@zope.interface.provider(IFallbackTranslationDomainFactory)
class DummyTranslationDomainFallback(object):
zope.interface.implements(ITranslationDomain)
zope.interface.classProvides(IFallbackTranslationDomainFactory)
def __init__(self, domain):
self.domain = domain
......
......@@ -40,6 +40,7 @@ from zLOG import LOG, INFO, PROBLEM
import errno
from StringIO import StringIO
@zope.interface.implementer(IWatermarkable)
class PDFDocument(Image):
"""
PDFDocument is a subclass of Image which is able to
......@@ -68,8 +69,6 @@ class PDFDocument(Image):
, PropertySheet.Periodicity
)
zope.interface.implements(IWatermarkable)
security.declareProtected(Permissions.AccessContentsInformation,
'getWatermarkedData')
def getWatermarkedData(self, watermark_data, repeat_watermark=True,
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocToDocx:
"""Transforms doc to docx by using Cloudooo"""
implements(itransform)
__name__ = 'doc_to_docx'
inputs = ('application/msword',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocToHtml:
"""Transforms doc to html by using Cloudooo"""
implements(itransform)
__name__ = 'doc_to_html'
inputs = ('application/msword',)
output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocxToDocy:
"""Transforms docx to docy by using Cloudooo"""
implements(itransform)
__name__ = 'docx_to_docy'
inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',)
output = 'application/x-asc-text'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocxToOdt:
"""Transforms docx to odt by using Cloudooo"""
implements(itransform)
__name__ = 'docx_to_odt'
inputs = ('application/vnd.openxmlformats-officedocument.wordprocessingml.document',)
output = 'application/vnd.oasis.opendocument.text'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class DocyToDocx:
"""Transforms docy to docx by using Cloudooo"""
implements(itransform)
__name__ = 'docy_to_docx'
inputs = ('application/x-asc-text',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToHtml:
"""Transforms odp to html by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_html'
inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToPdf:
"""Transforms odp to pdf by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_pdf'
inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/pdf'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToPptx:
"""Transforms odp to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_pptx'
inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdpToSxi:
"""Transforms odp to sxi by using Cloudooo"""
implements(itransform)
__name__ = 'odp_to_sxi'
inputs = ('application/vnd.oasis.opendocument.presentation',)
output = 'application/vnd.sun.xml.impress'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToHtml:
"""Transforms ods to html by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_html'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToPdf:
"""Transforms ods to pdf by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_pdf'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'application/pdf'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdsToXlsx:
"""Transforms ods to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'ods_to_xlsx'
inputs = ('application/vnd.oasis.opendocument.spreadsheet',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdtToDocx:
"""Transforms odt to docx by using Cloudooo"""
implements(itransform)
__name__ = 'odt_to_docx'
inputs = ('application/vnd.oasis.opendocument.text',)
output = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class OdtToHtml:
"""Transforms odt to html by using Cloudooo"""
implements(itransform)
__name__ = 'odt_to_html'
inputs = ('application/vnd.oasis.opendocument.text',)
output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PdfToBmp:
"""Transforms pdf to bmp by using Cloudooo"""
implements(itransform)
__name__ = 'pdf_to_bmp'
inputs = ('application/pdf',)
output = 'image/x-ms-bmp' # image/bmp
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptToPptx:
"""Transforms ppt to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'ppt_to_pptx'
inputs = ('application/vnd.ms-powerpoint',
'application/powerpoint',
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptxToOdp:
"""Transforms pptx to odp by using Cloudooo"""
implements(itransform)
__name__ = 'pptx_to_odp'
inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',)
output = 'application/vnd.oasis.opendocument.presentation'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptxToPpty:
"""Transforms pptx to ppty by using Cloudooo"""
implements(itransform)
__name__ = 'pptx_to_ppty'
inputs = ('application/vnd.openxmlformats-officedocument.presentationml.presentation',)
output = 'application/x-asc-presentation'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class PptyToPptx:
"""Transforms ppty to pptx by using Cloudooo"""
implements(itransform)
__name__ = 'ppty_to_pptx'
inputs = ('application/x-asc-presentation',)
output = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class SxiToHtml:
"""Transforms sxi to html by using Cloudooo"""
implements(itransform)
__name__ = 'sxi_to_html'
inputs = ('application/vnd.sun.xml.impress',)
output = 'text/html'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class SxiToOdp:
"""Transforms sxi to odp by using Cloudooo"""
implements(itransform)
__name__ = 'sxi_to_odp'
inputs = ('application/vnd.sun.xml.impress',)
output = 'application/vnd.oasis.opendocument.presentation'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsToOds:
"""Transforms xls to ods by using Cloudooo"""
implements(itransform)
__name__ = 'xls_to_ods'
inputs = ('application/vnd.ms-excel',)
output = 'application/vnd.oasis.opendocument.spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsToXlsx:
"""Transforms xls to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'xls_to_xlsx'
inputs = ('application/vnd.ms-excel',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsxToOds:
"""Transforms xlsx to ods by using Cloudooo"""
implements(itransform)
__name__ = 'xlsx_to_ods'
inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',)
output = 'application/vnd.oasis.opendocument.spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsxToXlsy:
"""Transforms xlsx to xlsy by using Cloudooo"""
implements(itransform)
__name__ = 'xlsx_to_xlsy'
inputs = ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',)
output = 'application/x-asc-spreadsheet'
......
from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements
from zope.interface import implementer
from Products.ERP5OOo.transforms.oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
@implementer(itransform)
class XlsyToXlsx:
"""Transforms xlsy to xlsx by using Cloudooo"""
implements(itransform)
__name__ = 'xlsy_to_xlsx'
inputs = ('application/x-asc-spreadsheet',)
output = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
......
......@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.document.Delivery import Delivery
@zope.interface.implementer( interfaces.IVariated,)
class Immobilisation(Delivery, XMLObject):
"""
An Immobilisation object holds the information about
......@@ -51,9 +52,6 @@ class Immobilisation(Delivery, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements( interfaces.IVariated, )
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
"""
Invoicing Rule expand simulation created by a order or delivery rule.
......@@ -49,11 +52,6 @@ class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties
property_sheets = (
PropertySheet.Base,
......
......@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class InvoiceTransactionSimulationRule(RuleMixin,
MovementCollectionUpdaterMixin, PredicateMatrix):
"""
......@@ -54,11 +57,6 @@ class InvoiceTransactionSimulationRule(RuleMixin,
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties
property_sheets = (
PropertySheet.Base,
......
......@@ -38,6 +38,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
"""
Rule for Trade Model
......@@ -50,11 +53,6 @@ class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties
property_sheets = (
PropertySheet.Base,
......
......@@ -35,13 +35,12 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.interface.IJSONConvertable import IJSONConvertable
@zope.interface.implementer(
IJSONConvertable,)
class JSONType(XMLObject):
"""
Represents a portal type with JSON Schema
"""
zope.interface.implements(
IJSONConvertable,
)
# Default Properties
property_sheets = ( PropertySheet.Base
......
......@@ -39,6 +39,7 @@ from Products.ERP5.mixin.periodicity import PeriodicityMixin
from Products.ERP5Type.Base import Base
from erp5.component.interface.IMovementGenerator import IMovementGenerator
@zope.interface.implementer(IMovementGenerator,)
class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin,
SimulableMixin, PeriodicityMixin):
"""
......@@ -67,10 +68,6 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin,
, PropertySheet.Periodicity
)
# Declarative interfaces
zope.interface.implements(IMovementGenerator,
)
def _createRootAppliedRule(self):
# only try to expand if we are not in draft state
if self.getValidationState() in ('draft', ): # XXX-JPS harcoded
......
......@@ -35,13 +35,13 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.interface.IPaymentService import IPaymentService
@zope.interface.implementer(IPaymentService)
class PaypalService(XMLObject):
"""Paypal Service for payment"""
meta_type = 'Paypal Service'
portal_type = 'Paypal Service'
security = ClassSecurityInfo()
zope.interface.implements(IPaymentService)
# Declarative security
security = ClassSecurityInfo()
......
......@@ -90,12 +90,11 @@ class PayzenREST:
from erp5.component.interface.IPaymentService import IPaymentService
@zope.interface.implementer(IPaymentService)
class PayzenService(XMLObject, PayzenREST):
meta_type = 'Payzen Service'
portal_type = 'Payzen Service'
zope.interface.implements(IPaymentService)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -47,6 +47,9 @@ from Products import ERP5Security
from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway
from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway
@zope.interface.implementer(
ISmsSendingGateway,
ISmsReceivingGateway)
class DummyGateway(XMLObject):
"""Dummy SMS Gateway Implementation"""
......@@ -57,10 +60,6 @@ class DummyGateway(XMLObject):
add_permission = Permissions.AddPortalContent
zope.interface.implements(
ISmsSendingGateway,
ISmsReceivingGateway)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -50,6 +50,9 @@ from erp5.component.module.SMSGatewayError import SMSGatewayError
from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway
from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway
@zope.interface.implementer(
ISmsSendingGateway,
ISmsReceivingGateway)
class EssendexGateway(XMLObject):
"""Base of SMS an Gateway. You can use push notification for delivered and new message notification."""
......@@ -60,10 +63,6 @@ class EssendexGateway(XMLObject):
add_permission = Permissions.AddPortalContent
zope.interface.implements(
ISmsSendingGateway,
ISmsReceivingGateway)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -48,6 +48,9 @@ from erp5.component.module.SMSGatewayError import SMSGatewayError
from erp5.component.interface.ISmsSendingGateway import ISmsSendingGateway
from erp5.component.interface.ISmsReceivingGateway import ISmsReceivingGateway
@zope.interface.implementer(
ISmsSendingGateway,
ISmsReceivingGateway)
class MobytGateway(XMLObject):
"""Mobyt SMS Gateway Implementation"""
......@@ -57,10 +60,6 @@ class MobytGateway(XMLObject):
add_permission = Permissions.AddPortalContent
zope.interface.implements(
ISmsSendingGateway,
ISmsReceivingGateway)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
......@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.interface.IDeliverySolver import IDeliverySolver
@zope.interface.implementer(IDeliverySolver,)
class FIFODeliverySolver(XMLObject):
"""
The FIFO solver reduces delivered quantity by reducing the quantity of
......@@ -54,9 +55,6 @@ class FIFODeliverySolver(XMLObject):
, PropertySheet.DeliverySolver
)
# Declarative interfaces
zope.interface.implements(IDeliverySolver,)
# IDeliverySolver Implementation
security.declareProtected(Permissions.AccessContentsInformation, 'getTotalQuantity')
def getTotalQuantity(self):
......
......@@ -38,6 +38,8 @@ from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategory
from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class ItemListSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
"""Target solver that split the prevision based on aggregated items.
......@@ -61,10 +63,6 @@ class ItemListSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
, PropertySheet.Arrow
, PropertySheet.TargetSolver
)
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
def _solve(self, activate_kw=None):
"""This method create new movement based on difference of aggregate sets.
......
......@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.FIFODeliverySolver import FIFODeliverySolver
from erp5.component.interface.IDeliverySolver import IDeliverySolver
@zope.interface.implementer(IDeliverySolver,)
class LIFODeliverySolver(FIFODeliverySolver):
"""
The LIFO solver reduces delivered quantity by reducing the quantity of
......@@ -54,9 +55,6 @@ class LIFODeliverySolver(FIFODeliverySolver):
, PropertySheet.DeliverySolver
)
# Declarative interfaces
zope.interface.implements(IDeliverySolver,)
def _getSimulationMovementList(self):
"""
Returns a list of simulation movement sorted from the first order.
......
......@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.FIFODeliverySolver import FIFODeliverySolver
from erp5.component.interface.IDeliverySolver import IDeliverySolver
@zope.interface.implementer(IDeliverySolver,)
class MinimisePriceDeliverySolver(FIFODeliverySolver):
"""
The Minimise Price deliver solver distributes quantity in order to minimise
......@@ -54,9 +55,6 @@ class MinimisePriceDeliverySolver(FIFODeliverySolver):
, PropertySheet.DeliverySolver
)
# Declarative interfaces
zope.interface.implements(IDeliverySolver,)
# IDeliverySolver Implementation
security.declareProtected(Permissions.ModifyPortalContent, 'setTotalQuantity')
def setTotalQuantity(self, new_quantity, activate_kw=None):
......
......@@ -37,6 +37,8 @@ from Products.ERP5Type.Message import translateString
from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class MovementSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
meta_type = 'ERP5 Movement Split Solver'
portal_type = 'Movement Split Solver'
......@@ -55,10 +57,6 @@ class MovementSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
, PropertySheet.Arrow
, PropertySheet.TargetSolver
)
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
def _solve(self, activate_kw=None):
"""
......
......@@ -34,6 +34,8 @@ from erp5.component.document.QuantitySplitSolver import QuantitySplitSolver
from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class QuantitySplitMoveSolver(QuantitySplitSolver):
"""Target solver that split the prevision based on quantity.
......@@ -52,11 +54,6 @@ class QuantitySplitMoveSolver(QuantitySplitSolver):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
# ISolver Implementation
def _solve(self, activate_kw=None):
"""
......
......@@ -39,6 +39,8 @@ from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategory
from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
"""Target solver that split the prevision based on quantity.
......@@ -62,10 +64,6 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
, PropertySheet.Arrow
, PropertySheet.TargetSolver
)
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
# ISolver Implementation
def _solve(self, activate_kw=None):
......
......@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin
from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(IConfigurable,)
class SolverDecision(ConfigurableMixin, XMLObject):
"""Solver Decision
......@@ -71,15 +72,6 @@ class SolverDecision(ConfigurableMixin, XMLObject):
, PropertySheet.SolverSelection
, PropertySheet.Configurable
)
# XXX-JPS missing property sheet or categories to specify
# (default)delivery or solver_application or order -> the object of application of resolution
# ie. a specified delivery, a specified delivery line, etc.
# (delivery should be enough)
# all property sheets of target solvers (with their configuration properties)
# Declarative interfaces
zope.interface.implements(IConfigurable,
)
security.declareProtected(Permissions.AccessContentsInformation,
'getDefaultConfigurationPropertyDict')
......
......@@ -37,6 +37,8 @@ from erp5.component.interface.IMovement import IMovement
from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class SolverProcess(XMLObject, ActiveProcess):
"""
Solver Process class represents the decision of the user
......@@ -74,11 +76,6 @@ class SolverProcess(XMLObject, ActiveProcess):
, PropertySheet.DublinCore
)
# Declarative interfaces
zope.interface.implements(ISolver,
IConfigurable,
)
# Implementation
security.declareProtected(Permissions.ModifyPortalContent, 'buildTargetSolverList')
@UnrestrictedMethod
......
......@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.AcceptSolver import AcceptSolver
from erp5.component.interface.ISolver import ISolver
@zope.interface.implementer(ISolver,)
class TradeModelSolver(AcceptSolver):
"""Solve Divergences on Invoice Lines, and dependant trade model lines.
......@@ -55,9 +56,6 @@ class TradeModelSolver(AcceptSolver):
, PropertySheet.TargetSolver
)
# Declarative interfaces
zope.interface.implements(ISolver,)
def _solve(self, activate_kw=None):
"""
Adopt new values to simulation movements, with keeping the original
......
......@@ -33,6 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.AcceptSolver import AcceptSolver
from erp5.component.interface.ISolver import ISolver
@zope.interface.implementer(ISolver,)
class UnifySolver(AcceptSolver):
"""
"""
......@@ -53,9 +54,6 @@ class UnifySolver(AcceptSolver):
, PropertySheet.TargetSolver
)
# Declarative interfaces
zope.interface.implements(ISolver,)
def _getActualTargetMovement(self, movement, solved_property):
# The movement might not be the right place to correct the
# divergence, if the property is obtained by direct Acquisition.
......
......@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions
from Products.ERP5Type.Globals import PersistentMapping
from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(IConfigurable,)
class ConfigurableMixin:
"""
This class provides a generic implementation of IConfigurable.
......@@ -47,9 +48,6 @@ class ConfigurableMixin:
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IConfigurable,)
security.declareProtected(Permissions.AccessContentsInformation,
'getConfigurationProperty')
def getConfigurationProperty(self, key, default=None):
......
......@@ -37,6 +37,8 @@ from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin
from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable
@zope.interface.implementer(ISolver,
IConfigurable,)
class ConfigurablePropertySolverMixin(SolverMixin,
ConfigurableMixin,
XMLObject):
......@@ -53,9 +55,6 @@ class ConfigurablePropertySolverMixin(SolverMixin,
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
zope.interface.implements(ISolver,
IConfigurable,)
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -36,6 +36,7 @@ from Products.PythonScripts.standard import html_quote as h
from zLOG import LOG, WARNING
from erp5.component.interface.IEquivalenceTester import IEquivalenceTester
@zope.interface.implementer(IEquivalenceTester,)
class EquivalenceTesterMixin:
"""
Provides generic methods and helper methods to implement
......@@ -45,9 +46,6 @@ class EquivalenceTesterMixin:
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IEquivalenceTester,)
# Implementation of IEquivalenceTester
security.declarePrivate('testEquivalence')
def testEquivalence(self, simulation_movement):
......
......@@ -34,6 +34,7 @@ from Products.ERP5Type import Permissions
from Products.ERP5Type.UnrestrictedMethod import super_user
from erp5.component.interface.ISolver import ISolver
@zope.interface.implementer(ISolver,)
class SolverMixin(object):
"""
Provides generic methods and helper methods to implement ISolver.
......@@ -42,9 +43,6 @@ class SolverMixin(object):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(ISolver,)
workflow_list = ()
def _solve(self, activate_kw=None):
raise NotImplementedError
......
......@@ -31,6 +31,7 @@ from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type.ObjectMessage import ObjectMessage
from erp5.component.interface.IDivergenceMessage import IDivergenceMessage
@zope.interface.implementer(IDivergenceMessage,)
class DivergenceMessage(ObjectMessage):
"""
Divergence Message is used for notifications to user about divergences.
......@@ -59,8 +60,6 @@ class DivergenceMessage(ObjectMessage):
User understandable message about divergence
"""
zope.interface.implements(IDivergenceMessage,)
def getMovementGroup(self):
"""Returns movement group of a builder which was responsible for generating tested_property"""
divergence_scope = getattr(self, 'divergence_scope', None)
......
......@@ -37,6 +37,7 @@ from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from erp5.component.interface.IDivergenceController import IDivergenceController
@zope.interface.implementer(IDivergenceController,)
class SolverProcessTool(BaseTool):
""" Container for solver processes.
"""
......@@ -49,9 +50,6 @@ class SolverProcessTool(BaseTool):
# Declarative Security
security = ClassSecurityInfo()
# Declarative interfaces
zope.interface.implements(IDivergenceController, )
# IDivergenceController implementation
security.declareProtected(Permissions.AccessContentsInformation,
'isDivergent')
......
......@@ -46,7 +46,7 @@ parser = etree.XMLParser(remove_blank_text=True)
from xml_marshaller.xml_marshaller import load_tree as unmarshaller
from xupdate_processor import xuproc
from base64 import standard_b64decode
from zope.interface import implements
from zope.interface import implementer
from copy import deepcopy
import logging
......@@ -91,6 +91,7 @@ WORKFLOW_ACTION_NOT_ADDABLE = 0
WORKFLOW_ACTION_ADDABLE = 1
WORKFLOW_ACTION_INSERTABLE = 2
@implementer( IConduit,)
class ERP5Conduit(XMLSyncUtilsMixin):
"""
A conduit is a piece of code in charge of
......@@ -128,9 +129,6 @@ class ERP5Conduit(XMLSyncUtilsMixin):
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
"""
# Declarative interfaces
implements( IConduit, )
# Declarative security
security = ClassSecurityInfo()
......
......@@ -39,6 +39,8 @@ from erp5.component.interface.IBusinessLink import IBusinessLink
import zope.interface
@zope.interface.implementer(IBusinessLink,
interfaces.IPredicate,)
class BusinessLink(Path, Predicate):
"""
The BusinessLink class embeds all information related to
......@@ -93,11 +95,6 @@ class BusinessLink(Path, Predicate):
, PropertySheet.PaymentCondition # XXX-JPS must be renames some day
)
# Declarative interfaces
zope.interface.implements(IBusinessLink,
interfaces.IPredicate,
)
# Helper Methods
def _getExplanationRelatedSimulationMovementValueList(self, explanation):
explanation_cache = _getExplanationCache(explanation)
......
......@@ -37,6 +37,9 @@ from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
@zope.interface.implementer(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
"""
Delivery Rule object make sure an Delivery in the simulation
......@@ -52,11 +55,6 @@ class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(IRule,
IDivergenceController,
IMovementCollectionUpdater,)
# Default Properties
property_sheets = (
PropertySheet.Base,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment