Commit 2dd6ad08 authored by Sebastien Robin's avatar Sebastien Robin
Browse files

- the possibility to pass --enable_full_indexing=portal_skins in

 order to make optimisation configuration in unit test
- isIndexable is not a property any more, it is a ConstantGetter
 instance, so it works like a property and like a method
- same thing for isPredicate, isTemplate, isDelivery... we can
 start moving using only methods.
- do not define isTemplate, isDelivery... when it is already
  available thanks to inheritance
- new methods generated for all ERP5 objects : provides[InterfaceName].
 For instance, "providesIMovement()" will return True or False for
 any ERP5 object.
- new method "is[Group]Type" generated for all ERP5 objects. The group
 here is group of portal types (like getPortalDeliveryTypeList()). So
 on any ERP5 object, you can do "isDeliveryType()", and this will
 returns True or False.
- add tests

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30704 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a9c4b53
......@@ -37,9 +37,6 @@ class DummyMovement(Movement):
meta_type = 'ERP5 Dummy Movement'
portal_type = 'Dummy Movement'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isMovement = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -63,8 +63,6 @@ class ActiveProcess(Base):
meta_type = 'CMF Active Process'
portal_type = 'Active Process'
isPortalContent = 0
isRADContent = 1
icon = None
# Declarative security
......
......@@ -36,6 +36,7 @@ from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Core.Folder import Folder
from Products.CMFCategory.Renderer import Renderer
from Products.ERP5Type.Utils import sortValueList
......@@ -117,9 +118,7 @@ class Category(Folder):
meta_type='CMF Category'
portal_type='Category' # may be useful in the future...
isPortalContent = 1
isRADContent = 1
isCategory = 1
isCategory = ConstantGetter('isCategory', value=True)
icon = None
allowed_types = (
......@@ -778,9 +777,7 @@ class BaseCategory(Category):
"""
meta_type='CMF Base Category'
portal_type='Base Category' # maybe useful some day
isPortalContent = 1
isRADContent = 1
isBaseCategory = 1
isBaseCategory = ConstantGetter('isBaseCategory', value=True)
constructors = (manage_addBaseCategoryForm, addBaseCategory)
......
......@@ -39,8 +39,6 @@ class AcceptSolver(XMLObject):
meta_type = 'ERP5 Accept Solver'
portal_type = 'Accept Solver'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isIndexable = 0 # We do not want to fill the catalog with objects on which we need no reporting
# Declarative security
......
......@@ -67,8 +67,6 @@ class Account(XMLObject):
meta_type = 'ERP5 Account'
portal_type = 'Account'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -59,9 +59,6 @@ An AccountingRuleCell object allows to add SaleInvoiceTransactionLines into a Ma
meta_type = 'ERP5 Accounting Rule Cell'
portal_type = 'Accounting Rule Cell'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -44,9 +44,6 @@ class AccountingTransaction(Delivery):
meta_type = 'ERP5 Accounting Transaction'
portal_type = 'Accounting Transaction'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -42,8 +42,6 @@ class AccountingTransactionLine(DeliveryLine):
meta_type = 'ERP5 Accounting Transaction Line'
portal_type = 'Accounting Transaction Line'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -28,6 +28,7 @@
##############################################################################
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.EmailDocument import EmailDocumentProxyMixin
from Products.ERP5.Document.Event import Event
......@@ -54,9 +55,7 @@ class Acknowledgement(EmailDocumentProxyMixin, Event):
meta_type = 'ERP5 Acknowledgement'
portal_type = 'Acknowledgement'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
isDelivery = ConstantGetter('isDelivery', value=True)
# Declarative security
security = ClassSecurityInfo()
......
......@@ -39,8 +39,6 @@ class AdoptSolver(XMLObject):
meta_type = 'ERP5 Adopt Solver'
portal_type = 'Adopt Solver'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isIndexable = 0 # We do not want to fill the catalog with objects on which we need no reporting
# Declarative security
......
......@@ -42,8 +42,6 @@ class Agent(Folder, Image):
# CMF Type Definition
meta_type = 'ERP5 Agent'
portal_type = 'Agent'
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -39,8 +39,6 @@ class AgentPrivilege(XMLObject):
# CMF Type Definition
meta_type = 'ERP5 Agent Privilege'
portal_type = 'Agent Privilege'
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -256,8 +256,6 @@ class Alarm(XMLObject, PeriodicityMixin):
meta_type = 'ERP5 Alarm'
portal_type = 'Alarm'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -50,8 +50,6 @@ class AmortisationRule(Rule):
meta_type = 'ERP5 Amortisation Rule'
portal_type = 'Amortisation Rule'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -56,8 +56,6 @@ class AmountFilter(MappedValue, Amount):
meta_type = 'ERP5 Amount Filter'
portal_type = 'Amount Filter'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -45,8 +45,6 @@ class AnnotationLine(PaySheetLine):
meta_type = 'ERP5 Annotation Line'
portal_type = 'Annotation Line'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -38,8 +38,6 @@ class Assignment(Path):
meta_type = 'ERP5 Assignment'
portal_type = 'Assignment'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -115,8 +115,6 @@ class AssortedResource(TransformedResource):
meta_type = 'ERP5 Assorted Resource'
portal_type = 'Assorted Resource'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......
......@@ -84,9 +84,6 @@ class BalanceTransaction(AccountingTransaction, Inventory):
meta_type = 'ERP5 Balance Transaction'
portal_type = 'Balance Transaction'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
#zope.interface.implements( interfaces.Inventory, )
......
......@@ -29,6 +29,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.AccountingTransactionLine import \
AccountingTransactionLine
from Products.ERP5.Document.InventoryLine import InventoryLine
......@@ -42,9 +43,7 @@ class BalanceTransactionLine(AccountingTransactionLine, InventoryLine):
meta_type = 'ERP5 Balance Transaction Line'
portal_type = 'Balance Transaction Line'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isIndexable = 0
isIndexable = ConstantGetter('isIndexable', value=False)
# Declarative security
security = ClassSecurityInfo()
......
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