Commit 8a0f0884 authored by Lucas Carvalho's avatar Lucas Carvalho

Implements interface in all Configurator Item.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41752 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6fa04ed1
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -44,6 +45,9 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -44,6 +45,9 @@ class AccountingPeriodConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -45,6 +46,9 @@ class CatalogKeywordKeyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,12 +26,11 @@
#
##############################################################################
import zope.interface
from StringIO import StringIO
from Acquisition import aq_base
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -54,6 +53,9 @@ class CategoriesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,10 +26,10 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
......@@ -45,6 +45,9 @@ class CategoryConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,10 +26,10 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
......@@ -45,6 +45,9 @@ class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.CMFCore.utils import getToolByName
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -48,6 +49,9 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......@@ -58,7 +62,7 @@ class CustomerBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
template_tool = getToolByName(self.getPortalObject(),
'portal_templates')
bt5 = template_tool.newContent(portal_type="Business Template", \
title=self.bt5_id)
title=self.bt5_title)
## ..and set it as current
business_configuration.setSpecialise(bt5.getRelativeUrl())
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.CMFCore.utils import getToolByName
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -45,6 +46,9 @@ class ExportCustomerBT5ConfiguratorItem(XMLObject, ConfiguratorItemMixin):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,10 +26,10 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
......@@ -45,6 +45,9 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -44,6 +45,9 @@ class PermissionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,9 +26,10 @@
#
##############################################################################
import zope.interface
from Acquisition import aq_base
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from DateTime import DateTime
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -46,6 +47,9 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -44,6 +45,9 @@ class PortalTypeConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -5,10 +5,10 @@
#
##############################################################################
import zope.interface
from Acquisition import aq_base
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -27,6 +27,9 @@ class PortalTypeRolesSpreadsheetConfiguratorItem(ConfiguratorItemMixin, XMLObjec
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -44,6 +45,9 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,9 +26,10 @@
#
##############################################################################
import zope.interface
from Acquisition import aq_base
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
from zLOG import LOG, INFO
......@@ -46,6 +47,9 @@ class RoleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,9 +26,10 @@
#
##############################################################################
import zope.interface
from Acquisition import aq_base
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
from zLOG import LOG, INFO
......@@ -46,6 +47,9 @@ class RuleConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -44,6 +45,9 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -44,6 +45,9 @@ class SitePropertyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,9 +26,10 @@
#
##############################################################################
import zope.interface
from Products.CMFCore.utils import getToolByName
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
import transaction
......@@ -47,6 +48,9 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -46,6 +47,9 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
......@@ -26,8 +26,9 @@
#
##############################################################################
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin
......@@ -44,6 +45,9 @@ class WorkflowSecurityConfiguratorItem(ConfiguratorItemMixin, XMLObject):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
zope.interface.implements(interfaces.IConfiguratorItem)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
......
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