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

- 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): ...@@ -37,9 +37,6 @@ class DummyMovement(Movement):
meta_type = 'ERP5 Dummy Movement' meta_type = 'ERP5 Dummy Movement'
portal_type = 'Dummy Movement' portal_type = 'Dummy Movement'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -63,8 +63,6 @@ class ActiveProcess(Base): ...@@ -63,8 +63,6 @@ class ActiveProcess(Base):
meta_type = 'CMF Active Process' meta_type = 'CMF Active Process'
portal_type = 'Active Process' portal_type = 'Active Process'
isPortalContent = 0
isRADContent = 1
icon = None icon = None
# Declarative security # Declarative security
......
...@@ -36,6 +36,7 @@ from Products.CMFCore.utils import getToolByName ...@@ -36,6 +36,7 @@ from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet from Products.ERP5Type import PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Core.Folder import Folder from Products.ERP5Type.Core.Folder import Folder
from Products.CMFCategory.Renderer import Renderer from Products.CMFCategory.Renderer import Renderer
from Products.ERP5Type.Utils import sortValueList from Products.ERP5Type.Utils import sortValueList
...@@ -117,9 +118,7 @@ class Category(Folder): ...@@ -117,9 +118,7 @@ class Category(Folder):
meta_type='CMF Category' meta_type='CMF Category'
portal_type='Category' # may be useful in the future... portal_type='Category' # may be useful in the future...
isPortalContent = 1 isCategory = ConstantGetter('isCategory', value=True)
isRADContent = 1
isCategory = 1
icon = None icon = None
allowed_types = ( allowed_types = (
...@@ -778,9 +777,7 @@ class BaseCategory(Category): ...@@ -778,9 +777,7 @@ class BaseCategory(Category):
""" """
meta_type='CMF Base Category' meta_type='CMF Base Category'
portal_type='Base Category' # maybe useful some day portal_type='Base Category' # maybe useful some day
isPortalContent = 1 isBaseCategory = ConstantGetter('isBaseCategory', value=True)
isRADContent = 1
isBaseCategory = 1
constructors = (manage_addBaseCategoryForm, addBaseCategory) constructors = (manage_addBaseCategoryForm, addBaseCategory)
......
...@@ -39,8 +39,6 @@ class AcceptSolver(XMLObject): ...@@ -39,8 +39,6 @@ class AcceptSolver(XMLObject):
meta_type = 'ERP5 Accept Solver' meta_type = 'ERP5 Accept Solver'
portal_type = 'Accept Solver' portal_type = 'Accept Solver'
add_permission = Permissions.AddPortalContent 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 isIndexable = 0 # We do not want to fill the catalog with objects on which we need no reporting
# Declarative security # Declarative security
......
...@@ -67,8 +67,6 @@ class Account(XMLObject): ...@@ -67,8 +67,6 @@ class Account(XMLObject):
meta_type = 'ERP5 Account' meta_type = 'ERP5 Account'
portal_type = 'Account' portal_type = 'Account'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -59,9 +59,6 @@ An AccountingRuleCell object allows to add SaleInvoiceTransactionLines into a Ma ...@@ -59,9 +59,6 @@ An AccountingRuleCell object allows to add SaleInvoiceTransactionLines into a Ma
meta_type = 'ERP5 Accounting Rule Cell' meta_type = 'ERP5 Accounting Rule Cell'
portal_type = 'Accounting Rule Cell' portal_type = 'Accounting Rule Cell'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -44,9 +44,6 @@ class AccountingTransaction(Delivery): ...@@ -44,9 +44,6 @@ class AccountingTransaction(Delivery):
meta_type = 'ERP5 Accounting Transaction' meta_type = 'ERP5 Accounting Transaction'
portal_type = 'Accounting Transaction' portal_type = 'Accounting Transaction'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -42,8 +42,6 @@ class AccountingTransactionLine(DeliveryLine): ...@@ -42,8 +42,6 @@ class AccountingTransactionLine(DeliveryLine):
meta_type = 'ERP5 Accounting Transaction Line' meta_type = 'ERP5 Accounting Transaction Line'
portal_type = 'Accounting Transaction Line' portal_type = 'Accounting Transaction Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces 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.EmailDocument import EmailDocumentProxyMixin
from Products.ERP5.Document.Event import Event from Products.ERP5.Document.Event import Event
...@@ -54,9 +55,7 @@ class Acknowledgement(EmailDocumentProxyMixin, Event): ...@@ -54,9 +55,7 @@ class Acknowledgement(EmailDocumentProxyMixin, Event):
meta_type = 'ERP5 Acknowledgement' meta_type = 'ERP5 Acknowledgement'
portal_type = 'Acknowledgement' portal_type = 'Acknowledgement'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1 isDelivery = ConstantGetter('isDelivery', value=True)
isRADContent = 1
isDelivery = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -39,8 +39,6 @@ class AdoptSolver(XMLObject): ...@@ -39,8 +39,6 @@ class AdoptSolver(XMLObject):
meta_type = 'ERP5 Adopt Solver' meta_type = 'ERP5 Adopt Solver'
portal_type = 'Adopt Solver' portal_type = 'Adopt Solver'
add_permission = Permissions.AddPortalContent 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 isIndexable = 0 # We do not want to fill the catalog with objects on which we need no reporting
# Declarative security # Declarative security
......
...@@ -42,8 +42,6 @@ class Agent(Folder, Image): ...@@ -42,8 +42,6 @@ class Agent(Folder, Image):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Agent' meta_type = 'ERP5 Agent'
portal_type = 'Agent' portal_type = 'Agent'
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -39,8 +39,6 @@ class AgentPrivilege(XMLObject): ...@@ -39,8 +39,6 @@ class AgentPrivilege(XMLObject):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Agent Privilege' meta_type = 'ERP5 Agent Privilege'
portal_type = 'Agent Privilege' portal_type = 'Agent Privilege'
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -256,8 +256,6 @@ class Alarm(XMLObject, PeriodicityMixin): ...@@ -256,8 +256,6 @@ class Alarm(XMLObject, PeriodicityMixin):
meta_type = 'ERP5 Alarm' meta_type = 'ERP5 Alarm'
portal_type = 'Alarm' portal_type = 'Alarm'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -50,8 +50,6 @@ class AmortisationRule(Rule): ...@@ -50,8 +50,6 @@ class AmortisationRule(Rule):
meta_type = 'ERP5 Amortisation Rule' meta_type = 'ERP5 Amortisation Rule'
portal_type = 'Amortisation Rule' portal_type = 'Amortisation Rule'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -56,8 +56,6 @@ class AmountFilter(MappedValue, Amount): ...@@ -56,8 +56,6 @@ class AmountFilter(MappedValue, Amount):
meta_type = 'ERP5 Amount Filter' meta_type = 'ERP5 Amount Filter'
portal_type = 'Amount Filter' portal_type = 'Amount Filter'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -45,8 +45,6 @@ class AnnotationLine(PaySheetLine): ...@@ -45,8 +45,6 @@ class AnnotationLine(PaySheetLine):
meta_type = 'ERP5 Annotation Line' meta_type = 'ERP5 Annotation Line'
portal_type = 'Annotation Line' portal_type = 'Annotation Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -38,8 +38,6 @@ class Assignment(Path): ...@@ -38,8 +38,6 @@ class Assignment(Path):
meta_type = 'ERP5 Assignment' meta_type = 'ERP5 Assignment'
portal_type = 'Assignment' portal_type = 'Assignment'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -115,8 +115,6 @@ class AssortedResource(TransformedResource): ...@@ -115,8 +115,6 @@ class AssortedResource(TransformedResource):
meta_type = 'ERP5 Assorted Resource' meta_type = 'ERP5 Assorted Resource'
portal_type = 'Assorted Resource' portal_type = 'Assorted Resource'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -84,9 +84,6 @@ class BalanceTransaction(AccountingTransaction, Inventory): ...@@ -84,9 +84,6 @@ class BalanceTransaction(AccountingTransaction, Inventory):
meta_type = 'ERP5 Balance Transaction' meta_type = 'ERP5 Balance Transaction'
portal_type = 'Balance Transaction' portal_type = 'Balance Transaction'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
#zope.interface.implements( interfaces.Inventory, ) #zope.interface.implements( interfaces.Inventory, )
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.AccountingTransactionLine import \ from Products.ERP5.Document.AccountingTransactionLine import \
AccountingTransactionLine AccountingTransactionLine
from Products.ERP5.Document.InventoryLine import InventoryLine from Products.ERP5.Document.InventoryLine import InventoryLine
...@@ -42,9 +43,7 @@ class BalanceTransactionLine(AccountingTransactionLine, InventoryLine): ...@@ -42,9 +43,7 @@ class BalanceTransactionLine(AccountingTransactionLine, InventoryLine):
meta_type = 'ERP5 Balance Transaction Line' meta_type = 'ERP5 Balance Transaction Line'
portal_type = 'Balance Transaction Line' portal_type = 'Balance Transaction Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1 isIndexable = ConstantGetter('isIndexable', value=False)
isRADContent = 1
isIndexable = 0
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -50,8 +50,6 @@ class BankAccount(Folder, Coordinate, MetaNode): ...@@ -50,8 +50,6 @@ class BankAccount(Folder, Coordinate, MetaNode):
meta_type = 'ERP5 Bank Account' meta_type = 'ERP5 Bank Account'
portal_type = 'Bank Account' portal_type = 'Bank Account'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -30,6 +30,7 @@ from Products.CMFCategory.Category import BaseCategory as CMFBaseCategory ...@@ -30,6 +30,7 @@ from Products.CMFCategory.Category import BaseCategory as CMFBaseCategory
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import interfaces, Permissions, PropertySheet from Products.ERP5Type import interfaces, Permissions, PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Base import _aq_reset from Products.ERP5Type.Base import _aq_reset
...@@ -43,9 +44,7 @@ class BaseCategory(CMFBaseCategory, XMLObject): ...@@ -43,9 +44,7 @@ class BaseCategory(CMFBaseCategory, XMLObject):
""" """
meta_type='ERP5 Base Category' meta_type='ERP5 Base Category'
portal_type='Base Category' # maybe useful some day portal_type='Base Category' # maybe useful some day
isPortalContent = 1 isCategory = ConstantGetter('isCategory', value=True)
isRADContent = 1
isCategory = 1
allowed_types = ('ERP5 Category', ) allowed_types = ('ERP5 Category', )
# Declarative security # Declarative security
......
...@@ -44,8 +44,6 @@ class BaseDomain(Domain): ...@@ -44,8 +44,6 @@ class BaseDomain(Domain):
meta_type = 'ERP5 Base Domain' meta_type = 'ERP5 Base Domain'
portal_type = 'Base Domain' portal_type = 'Base Domain'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -40,8 +40,6 @@ class Binder(Folder, Document): ...@@ -40,8 +40,6 @@ class Binder(Folder, Document):
meta_type = 'ERP5 Binder' meta_type = 'ERP5 Binder'
portal_type = 'Binder' portal_type = 'Binder'
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -61,8 +61,6 @@ class Budget(Predicate, Variated): ...@@ -61,8 +61,6 @@ class Budget(Predicate, Variated):
meta_type='ERP5 Budget' meta_type='ERP5 Budget'
portal_type='Budget' portal_type='Budget'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -60,8 +60,6 @@ class BudgetCell(Predicate, MetaNode, Movement): ...@@ -60,8 +60,6 @@ class BudgetCell(Predicate, MetaNode, Movement):
meta_type='ERP5 Budget Cell' meta_type='ERP5 Budget Cell'
portal_type='Budget Cell' portal_type='Budget Cell'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -63,8 +63,6 @@ class BudgetLine(Predicate, XMLMatrix, Variated): ...@@ -63,8 +63,6 @@ class BudgetLine(Predicate, XMLMatrix, Variated):
meta_type='ERP5 Budget Line' meta_type='ERP5 Budget Line'
portal_type='Budget Line' portal_type='Budget Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -52,8 +52,6 @@ class BudgetModel(Predicate): ...@@ -52,8 +52,6 @@ class BudgetModel(Predicate):
meta_type = 'ERP5 Budget Model' meta_type = 'ERP5 Budget Model'
portal_type = 'Budget Model' portal_type = 'Budget Model'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -54,8 +54,6 @@ class BudgetTransaction(DeliveryLine): ...@@ -54,8 +54,6 @@ class BudgetTransaction(DeliveryLine):
meta_type='ERP5 Budget Transaction' meta_type='ERP5 Budget Transaction'
portal_type='Budget Transaction' portal_type='Budget Transaction'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -53,8 +53,6 @@ class BudgetTransfer(Supply): ...@@ -53,8 +53,6 @@ class BudgetTransfer(Supply):
meta_type='ERP5 Budget Transfer' meta_type='ERP5 Budget Transfer'
portal_type='Budget Transfer' portal_type='Budget Transfer'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -54,8 +54,6 @@ class BudgetTransferLine(SupplyLine): ...@@ -54,8 +54,6 @@ class BudgetTransferLine(SupplyLine):
meta_type='ERP5 Budget Transfer Line' meta_type='ERP5 Budget Transfer Line'
portal_type='Budget Transfer Line' portal_type='Budget Transfer Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -55,8 +55,6 @@ class BudgetVariation(Predicate): ...@@ -55,8 +55,6 @@ class BudgetVariation(Predicate):
meta_type='ERP5 Budget Variation' meta_type='ERP5 Budget Variation'
portal_type='Budget Variation' portal_type='Budget Variation'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -38,9 +38,6 @@ class Bug(Ticket): ...@@ -38,9 +38,6 @@ class Bug(Ticket):
meta_type = 'ERP5 Bug' meta_type = 'ERP5 Bug'
portal_type = 'Bug' portal_type = 'Bug'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -65,7 +65,6 @@ class BusinessPath(Path): ...@@ -65,7 +65,6 @@ class BusinessPath(Path):
""" """
meta_type = 'ERP5 Business Path' meta_type = 'ERP5 Business Path'
portal_type = 'Business Path' portal_type = 'Business Path'
isPredicate = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -48,7 +48,6 @@ class BusinessProcess(Path, XMLObject): ...@@ -48,7 +48,6 @@ class BusinessProcess(Path, XMLObject):
""" """
meta_type = 'ERP5 Business Process' meta_type = 'ERP5 Business Process'
portal_type = 'Business Process' portal_type = 'Business Process'
isPredicate = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -33,6 +33,7 @@ from Products.ERP5Type.Globals import Persistent, PersistentMapping ...@@ -33,6 +33,7 @@ from Products.ERP5Type.Globals import Persistent, PersistentMapping
from Acquisition import Implicit, aq_base from Acquisition import Implicit, aq_base
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Base import WorkflowMethod, _aq_reset from Products.ERP5Type.Base import WorkflowMethod, _aq_reset
from Products.ERP5Type.Utils import readLocalDocument, \ from Products.ERP5Type.Utils import readLocalDocument, \
writeLocalDocument, \ writeLocalDocument, \
...@@ -919,7 +920,7 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -919,7 +920,7 @@ class ObjectTemplateItem(BaseTemplateItem):
# manage_afterClone in order to not call recursiveReindex, this is # manage_afterClone in order to not call recursiveReindex, this is
# useless because we will already reindex every created object, so # useless because we will already reindex every created object, so
# we avoid duplication of reindexation # we avoid duplication of reindexation
obj.isIndexable = 0 obj.isIndexable = ConstantGetter('isIndexable', value=False)
obj.manage_afterClone(obj) obj.manage_afterClone(obj)
del obj.isIndexable del obj.isIndexable
if getattr(aq_base(obj), 'reindexObject', None) is not None: if getattr(aq_base(obj), 'reindexObject', None) is not None:
...@@ -4615,8 +4616,6 @@ class BusinessTemplate(XMLObject): ...@@ -4615,8 +4616,6 @@ class BusinessTemplate(XMLObject):
meta_type = 'ERP5 Business Template' meta_type = 'ERP5 Business Template'
portal_type = 'Business Template' portal_type = 'Business Template'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -37,8 +37,6 @@ class Calendar(Delivery): ...@@ -37,8 +37,6 @@ class Calendar(Delivery):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Calendar' meta_type = 'ERP5 Calendar'
portal_type = 'Calendar' portal_type = 'Calendar'
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -38,8 +38,6 @@ class CalendarException(XMLObject): ...@@ -38,8 +38,6 @@ class CalendarException(XMLObject):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Calendar Exception' meta_type = 'ERP5 Calendar Exception'
portal_type = 'Calendar Exception' portal_type = 'Calendar Exception'
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo ...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
...@@ -41,7 +42,7 @@ class Capacity(XMLObject): ...@@ -41,7 +42,7 @@ class Capacity(XMLObject):
""" """
meta_type = 'ERP5 Capacity' meta_type = 'ERP5 Capacity'
isCapacity = 1 isCapacity = ConstantGetter('isCapacity', value=True)
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -42,8 +42,6 @@ class Career(Path): ...@@ -42,8 +42,6 @@ class Career(Path):
meta_type = 'ERP5 Career' meta_type = 'ERP5 Career'
portal_type = 'Career' portal_type = 'Career'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo ...@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5.Document.MetaNode import MetaNode from Products.ERP5.Document.MetaNode import MetaNode
from Products.ERP5.Document.MetaResource import MetaResource from Products.ERP5.Document.MetaResource import MetaResource
from Products.ERP5Type import interfaces, Permissions, PropertySheet from Products.ERP5Type import interfaces, Permissions, PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from Products.ERP5.Document.Predicate import Predicate from Products.ERP5.Document.Predicate import Predicate
...@@ -93,9 +94,7 @@ class Category(CMFCategory, Predicate, MetaNode, MetaResource): ...@@ -93,9 +94,7 @@ class Category(CMFCategory, Predicate, MetaNode, MetaResource):
meta_type='ERP5 Category' meta_type='ERP5 Category'
portal_type='Category' # may be useful in the future... portal_type='Category' # may be useful in the future...
isPortalContent = 1 isCategory = ConstantGetter('isCategory', value=True)
isRADContent = 1
isCategory = 1
allowed_types = ('ERP5 Category', ) allowed_types = ('ERP5 Category', )
# Declarative security # Declarative security
......
...@@ -50,8 +50,6 @@ class CategoryBudgetVariation(BudgetVariation): ...@@ -50,8 +50,6 @@ class CategoryBudgetVariation(BudgetVariation):
meta_type = 'ERP5 Category Budget Variation' meta_type = 'ERP5 Category Budget Variation'
portal_type = 'Category Budget Variation' portal_type = 'Category Budget Variation'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -44,8 +44,6 @@ class CategoryDivergenceTester(PropertyDivergenceTester): ...@@ -44,8 +44,6 @@ class CategoryDivergenceTester(PropertyDivergenceTester):
meta_type = 'ERP5 Category Divergence Tester' meta_type = 'ERP5 Category Divergence Tester'
portal_type = 'Category Divergence Tester' portal_type = 'Category Divergence Tester'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -39,8 +39,6 @@ class Computer(Machine): ...@@ -39,8 +39,6 @@ class Computer(Machine):
meta_type = 'ERP5 Computer' meta_type = 'ERP5 Computer'
portal_type = 'Computer' portal_type = 'Computer'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -44,7 +44,6 @@ class ContainerCell(DeliveryCell): ...@@ -44,7 +44,6 @@ class ContainerCell(DeliveryCell):
meta_type = 'ERP5 Container Cell' meta_type = 'ERP5 Container Cell'
portal_type = 'Container Cell' portal_type = 'Container Cell'
isCell = 1 isCell = 1
isMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -41,9 +41,6 @@ class ContributionPredicate(Predicate, XMLObject): ...@@ -41,9 +41,6 @@ class ContributionPredicate(Predicate, XMLObject):
meta_type = 'ERP5 Contribution Predicate' meta_type = 'ERP5 Contribution Predicate'
portal_type = 'Contribution Predicate' portal_type = 'Contribution Predicate'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isPredicate = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -77,8 +77,6 @@ class Coordinate(Base): ...@@ -77,8 +77,6 @@ class Coordinate(Base):
meta_type = 'ERP5 Coordinate' meta_type = 'ERP5 Coordinate'
portal_type = 'Coordinate' portal_type = 'Coordinate'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative interface # Declarative interface
zope.interface.implements(interfaces.ICoordinate, ) zope.interface.implements(interfaces.ICoordinate, )
......
...@@ -41,8 +41,6 @@ class Currency(Resource): ...@@ -41,8 +41,6 @@ class Currency(Resource):
meta_type = 'ERP5 Currency' meta_type = 'ERP5 Currency'
portal_type = 'Currency' portal_type = 'Currency'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -34,6 +34,7 @@ from Products.CMFCore.utils import getToolByName ...@@ -34,6 +34,7 @@ from Products.CMFCore.utils import getToolByName
from Products.ERP5Type.Base import WorkflowMethod from Products.ERP5Type.Base import WorkflowMethod
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Document.ImmobilisationDelivery import ImmobilisationDelivery from Products.ERP5.Document.ImmobilisationDelivery import ImmobilisationDelivery
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
...@@ -49,9 +50,7 @@ class Delivery(XMLObject, ImmobilisationDelivery): ...@@ -49,9 +50,7 @@ class Delivery(XMLObject, ImmobilisationDelivery):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Delivery' meta_type = 'ERP5 Delivery'
portal_type = 'Delivery' portal_type = 'Delivery'
isPortalContent = 1 isDelivery = ConstantGetter('isDelivery', value=True)
isRADContent = 1
isDelivery = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -53,7 +53,6 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement): ...@@ -53,7 +53,6 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
meta_type = 'ERP5 Delivery Cell' meta_type = 'ERP5 Delivery Cell'
portal_type = 'Delivery Cell' portal_type = 'Delivery Cell'
isCell = 1 isCell = 1
isMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
...@@ -179,3 +178,8 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement): ...@@ -179,3 +178,8 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
parent = parent.getParentValue() parent = parent.getParentValue()
if parent is not None: if parent is not None:
parent.updateSimulationDeliveryProperties(movement_list, self) parent.updateSimulationDeliveryProperties(movement_list, self)
security.declareProtected(Permissions.AccessContentsInformation, 'isMovement')
def isMovement(self):
return 1
...@@ -41,8 +41,6 @@ class DependentCapacity(Capacity): ...@@ -41,8 +41,6 @@ class DependentCapacity(Capacity):
meta_type = 'ERP5 Dependent Capacity' meta_type = 'ERP5 Dependent Capacity'
portal_type = 'Dependent Capacity' portal_type = 'Dependent Capacity'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -40,8 +40,6 @@ class Device(Item): ...@@ -40,8 +40,6 @@ class Device(Item):
meta_type = 'ERP5 Device' meta_type = 'ERP5 Device'
portal_type = 'Device' portal_type = 'Device'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -33,6 +33,7 @@ from zLOG import LOG ...@@ -33,6 +33,7 @@ from zLOG import LOG
from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl import ClassSecurityInfo, getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Globals import get_request from Products.ERP5Type.Globals import get_request
from Products.CMFCore.utils import getToolByName, _checkPermission from Products.CMFCore.utils import getToolByName, _checkPermission
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
...@@ -489,9 +490,7 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, S ...@@ -489,9 +490,7 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, CachedConvertableMixin, S
meta_type = 'ERP5 Document' meta_type = 'ERP5 Document'
portal_type = 'Document' portal_type = 'Document'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1 isDocument = ConstantGetter('isDocument', value=True)
isRADContent = 1
isDocument = 1
__dav_collection__=0 __dav_collection__=0
zope.interface.implements(interfaces.IConvertable, zope.interface.implements(interfaces.IConvertable,
......
...@@ -74,8 +74,6 @@ class Domain(Predicate, MetaNode, MetaResource): ...@@ -74,8 +74,6 @@ class Domain(Predicate, MetaNode, MetaResource):
meta_type = 'ERP5 Domain' meta_type = 'ERP5 Domain'
portal_type = 'Domain' portal_type = 'Domain'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
...@@ -44,8 +45,7 @@ class DomainGenerator(XMLObject): ...@@ -44,8 +45,7 @@ class DomainGenerator(XMLObject):
""" """
meta_type='ERP5 Domain Generator' meta_type='ERP5 Domain Generator'
portal_type='Domain Generator' portal_type='Domain Generator'
isPortalContent = 0 isPortalContent = ConstantGetter('isPortalContent', value=False)
isRADContent = 1
icon = None icon = None
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -31,6 +31,7 @@ import re, types ...@@ -31,6 +31,7 @@ import re, types
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5Type.Globals import get_request from Products.ERP5Type.Globals import get_request
from AccessControl import ClassSecurityInfo, Unauthorized from AccessControl import ClassSecurityInfo, Unauthorized
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Base import WorkflowMethod from Products.ERP5Type.Base import WorkflowMethod
from Products.CMFCore.utils import getToolByName, _checkPermission from Products.CMFCore.utils import getToolByName, _checkPermission
from Products.CMFCore.utils import _setCacheHeaders, _ViewEmulator from Products.CMFCore.utils import _setCacheHeaders, _ViewEmulator
...@@ -135,10 +136,8 @@ class EmailDocument(File, TextDocument): ...@@ -135,10 +136,8 @@ class EmailDocument(File, TextDocument):
meta_type = 'ERP5 Email Document' meta_type = 'ERP5 Email Document'
portal_type = 'Email Document' portal_type = 'Email Document'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1 # XXX must be removed later - only event is a delivery
isRADContent = 1 isDelivery = ConstantGetter('isDelivery', value=True)
isDocument = 1
isDelivery = 1 # XXX must be removed later - only event is a delivery
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.Movement import Movement from Products.ERP5.Document.Movement import Movement
from Products.ERP5.Document.EmailDocument import EmailDocument from Products.ERP5.Document.EmailDocument import EmailDocument
...@@ -103,10 +104,7 @@ class Event(EmailDocument, Movement, AcknowledgeableMixin): ...@@ -103,10 +104,7 @@ class Event(EmailDocument, Movement, AcknowledgeableMixin):
meta_type = 'ERP5 Event' meta_type = 'ERP5 Event'
portal_type = 'Event' portal_type = 'Event'
isPortalContent = 1 isDelivery = ConstantGetter('isDelivery', value=True)
isRADContent = 1
isDelivery = 1
isMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -74,8 +74,6 @@ class ExtFolder( XMLObject ): ...@@ -74,8 +74,6 @@ class ExtFolder( XMLObject ):
meta_type='ERP5 External Folder' meta_type='ERP5 External Folder'
portal_type='External Folder' portal_type='External Folder'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -97,8 +97,6 @@ class ExternalSource(XMLObject, UrlMixIn, UpdateMixIn): ...@@ -97,8 +97,6 @@ class ExternalSource(XMLObject, UrlMixIn, UpdateMixIn):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 External Source' meta_type = 'ERP5 External Source'
portal_type = 'External Source' portal_type = 'External Source'
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -73,8 +73,6 @@ class File(Document, CMFFile, CachedConvertableMixin): ...@@ -73,8 +73,6 @@ class File(Document, CMFFile, CachedConvertableMixin):
meta_type = 'ERP5 File' meta_type = 'ERP5 File'
portal_type = 'File' portal_type = 'File'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -44,8 +44,6 @@ class FloatDivergenceTester(Predicate): ...@@ -44,8 +44,6 @@ class FloatDivergenceTester(Predicate):
meta_type = 'ERP5 Float Divergence Tester' meta_type = 'ERP5 Float Divergence Tester'
portal_type = 'Float Divergence Tester' portal_type = 'Float Divergence Tester'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -50,8 +50,6 @@ class GeographicAddress(Coordinate, Base): ...@@ -50,8 +50,6 @@ class GeographicAddress(Coordinate, Base):
meta_type = 'ERP5 Geographic Address' meta_type = 'ERP5 Geographic Address'
portal_type = 'Address' portal_type = 'Address'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -85,8 +85,6 @@ class Image(File, OFSImage): ...@@ -85,8 +85,6 @@ class Image(File, OFSImage):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Image' meta_type = 'ERP5 Image'
portal_type = 'Image' portal_type = 'Image'
isPortalContent = 1
isRADContent = 1
# Default attribute values # Default attribute values
width = 0 width = 0
......
...@@ -60,8 +60,6 @@ class ImmobilisableItem(XMLObject, Amount): ...@@ -60,8 +60,6 @@ class ImmobilisableItem(XMLObject, Amount):
meta_type = 'ERP5 ImmobilisableItem' meta_type = 'ERP5 ImmobilisableItem'
portal_type = 'Immobilisable Item' portal_type = 'Immobilisable Item'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -41,7 +41,7 @@ from Products.ERP5.Document.Delivery import Delivery ...@@ -41,7 +41,7 @@ from Products.ERP5.Document.Delivery import Delivery
from string import capitalize from string import capitalize
from zLOG import LOG from zLOG import LOG
class Immobilisation(XMLObject, Delivery): class Immobilisation(Delivery, XMLObject):
""" """
An Immobilisation object holds the information about An Immobilisation object holds the information about
an accounting immobilisation (in order to amortise an object) an accounting immobilisation (in order to amortise an object)
...@@ -53,10 +53,6 @@ class Immobilisation(XMLObject, Delivery): ...@@ -53,10 +53,6 @@ class Immobilisation(XMLObject, Delivery):
meta_type = 'ERP5 Immobilisation' meta_type = 'ERP5 Immobilisation'
portal_type = 'Immobilisation' portal_type = 'Immobilisation'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
isMovement = 0
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -46,9 +46,6 @@ class ImmobilisationCell(Movement, XMLObject, ImmobilisationMovement): ...@@ -46,9 +46,6 @@ class ImmobilisationCell(Movement, XMLObject, ImmobilisationMovement):
meta_type = 'ERP5 Immobilisation Cell' meta_type = 'ERP5 Immobilisation Cell'
portal_type = 'Immobilisation Cell' portal_type = 'Immobilisation Cell'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isMovement = 1
isAccountable = 0 # It should not be indexed in stock table isAccountable = 0 # It should not be indexed in stock table
# Declarative security # Declarative security
......
...@@ -58,8 +58,6 @@ class ImmobilisationDelivery(XMLObject): ...@@ -58,8 +58,6 @@ class ImmobilisationDelivery(XMLObject):
meta_type = 'ERP5 Immobilisation Delivery' meta_type = 'ERP5 Immobilisation Delivery'
portal_type = 'Immobilisation Delivery' portal_type = 'Immobilisation Delivery'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -47,9 +47,6 @@ class ImmobilisationLine(Movement, XMLObject, ImmobilisationMovement, DeliveryLi ...@@ -47,9 +47,6 @@ class ImmobilisationLine(Movement, XMLObject, ImmobilisationMovement, DeliveryLi
meta_type = 'ERP5 Immobilisation Line' meta_type = 'ERP5 Immobilisation Line'
portal_type = 'Immobilisation Line' portal_type = 'Immobilisation Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isMovement = 1
isAccountable = 0 # It should not be indexed in stock table isAccountable = 0 # It should not be indexed in stock table
# Declarative security # Declarative security
......
...@@ -76,8 +76,6 @@ class ImmobilisationMovement(Movement, XMLObject): ...@@ -76,8 +76,6 @@ class ImmobilisationMovement(Movement, XMLObject):
meta_type = 'ERP5 Immobilisation Movement' meta_type = 'ERP5 Immobilisation Movement'
portal_type = 'Immobilisation Movement' portal_type = 'Immobilisation Movement'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -41,8 +41,6 @@ class IndependentCapacity(Capacity): ...@@ -41,8 +41,6 @@ class IndependentCapacity(Capacity):
meta_type = 'ERP5 Independent Capacity' meta_type = 'ERP5 Independent Capacity'
portal_type = 'Independent Capacity' portal_type = 'Independent Capacity'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -44,8 +44,6 @@ class InternetProtocolAddress(Base, Coordinate): ...@@ -44,8 +44,6 @@ class InternetProtocolAddress(Base, Coordinate):
meta_type = 'ERP5 Internet Protocol Address' meta_type = 'ERP5 Internet Protocol Address'
portal_type = 'Internet Protocol Address' portal_type = 'Internet Protocol Address'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.Delivery import Delivery from Products.ERP5.Document.Delivery import Delivery
from Acquisition import aq_base from Acquisition import aq_base
from zLOG import LOG from zLOG import LOG
...@@ -39,10 +40,7 @@ class Inventory(Delivery): ...@@ -39,10 +40,7 @@ class Inventory(Delivery):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Inventory' meta_type = 'ERP5 Inventory'
portal_type = 'Inventory' portal_type = 'Inventory'
isPortalContent = 1 isInventory = ConstantGetter('isInventory', value=True)
isRADContent = 1
isDelivery = 1
isInventory = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -30,6 +30,7 @@ from Acquisition import aq_base ...@@ -30,6 +30,7 @@ from Acquisition import aq_base
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.DeliveryCell import DeliveryCell from Products.ERP5.Document.DeliveryCell import DeliveryCell
...@@ -43,10 +44,7 @@ class InventoryCell(DeliveryCell): ...@@ -43,10 +44,7 @@ class InventoryCell(DeliveryCell):
meta_type = 'ERP5 Inventory Cell' meta_type = 'ERP5 Inventory Cell'
portal_type = 'Inventory Cell' portal_type = 'Inventory Cell'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1 isInventoryMovement = ConstantGetter('isInventoryMovement', value=True)
isRADContent = 1
isMovement = 1
isInventoryMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -32,6 +32,7 @@ from Acquisition import aq_base ...@@ -32,6 +32,7 @@ from Acquisition import aq_base
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.DeliveryLine import DeliveryLine from Products.ERP5.Document.DeliveryLine import DeliveryLine
from Products.ERP5.Document.Movement import Movement from Products.ERP5.Document.Movement import Movement
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from zLOG import LOG from zLOG import LOG
...@@ -43,9 +44,7 @@ class InventoryLine(DeliveryLine): ...@@ -43,9 +44,7 @@ class InventoryLine(DeliveryLine):
meta_type = 'ERP5 Inventory Line' meta_type = 'ERP5 Inventory Line'
portal_type = 'Inventory Line' portal_type = 'Inventory Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1 isInventoryMovement = ConstantGetter('isInventoryMovement', value=True)
isRADContent = 1
isInventoryMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -37,8 +37,6 @@ class Invoice(AccountingTransaction): ...@@ -37,8 +37,6 @@ class Invoice(AccountingTransaction):
meta_type = 'ERP5 Invoice' meta_type = 'ERP5 Invoice'
portal_type = 'Invoice' portal_type = 'Invoice'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -43,10 +43,7 @@ class InvoiceCell(DeliveryCell): ...@@ -43,10 +43,7 @@ class InvoiceCell(DeliveryCell):
meta_type = 'ERP5 Invoice Cell' meta_type = 'ERP5 Invoice Cell'
portal_type = 'Invoice Cell' portal_type = 'Invoice Cell'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isCell = 1 isCell = 1
isMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -48,8 +48,6 @@ class InvoiceLine(DeliveryLine): ...@@ -48,8 +48,6 @@ class InvoiceLine(DeliveryLine):
meta_type = 'ERP5 Invoice Line' meta_type = 'ERP5 Invoice Line'
portal_type = 'Invoice Line' portal_type = 'Invoice Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -44,8 +44,6 @@ class InvoiceRule(DeliveryRule): ...@@ -44,8 +44,6 @@ class InvoiceRule(DeliveryRule):
meta_type = 'ERP5 Invoice Rule' meta_type = 'ERP5 Invoice Rule'
portal_type = 'Invoice Rule' portal_type = 'Invoice Rule'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -45,8 +45,6 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -45,8 +45,6 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
meta_type = 'ERP5 Invoice Transaction Rule' meta_type = 'ERP5 Invoice Transaction Rule'
portal_type = 'Invoice Transaction Rule' portal_type = 'Invoice Transaction Rule'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -42,8 +42,6 @@ class InvoicingRule(Rule): ...@@ -42,8 +42,6 @@ class InvoicingRule(Rule):
meta_type = 'ERP5 Invoicing Rule' meta_type = 'ERP5 Invoicing Rule'
portal_type = 'Invoicing Rule' portal_type = 'Invoicing Rule'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -57,8 +57,6 @@ class Item(XMLObject, Amount, ImmobilisableItem): ...@@ -57,8 +57,6 @@ class Item(XMLObject, Amount, ImmobilisableItem):
meta_type = 'ERP5 Item' meta_type = 'ERP5 Item'
portal_type = 'Item' portal_type = 'Item'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -40,8 +40,6 @@ class Machine(Item): ...@@ -40,8 +40,6 @@ class Machine(Item):
meta_type = 'ERP5 Machine' meta_type = 'ERP5 Machine'
portal_type = 'Machine' portal_type = 'Machine'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
...@@ -55,8 +55,6 @@ class MailMessage(Event): ...@@ -55,8 +55,6 @@ class MailMessage(Event):
meta_type = 'ERP5 Mail Message' meta_type = 'ERP5 Mail Message'
portal_type = 'Mail Message' portal_type = 'Mail Message'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -58,8 +58,6 @@ class MappedValue(Predicate, Amount): ...@@ -58,8 +58,6 @@ class MappedValue(Predicate, Amount):
meta_type = 'ERP5 Mapped Value' meta_type = 'ERP5 Mapped Value'
portal_type = 'Mapped Value' portal_type = 'Mapped Value'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -42,8 +42,6 @@ class MetaNode(Node): ...@@ -42,8 +42,6 @@ class MetaNode(Node):
meta_type = 'ERP5 MetaNode' meta_type = 'ERP5 MetaNode'
portal_type = 'MetaNode' portal_type = 'MetaNode'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -41,8 +41,6 @@ class MetaResource(Resource): ...@@ -41,8 +41,6 @@ class MetaResource(Resource):
meta_type = 'ERP5 MetaResource' meta_type = 'ERP5 MetaResource'
portal_type = 'MetaResource' portal_type = 'MetaResource'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -175,9 +175,6 @@ class Movement(XMLObject, Amount): ...@@ -175,9 +175,6 @@ class Movement(XMLObject, Amount):
meta_type = 'ERP5 Movement' meta_type = 'ERP5 Movement'
portal_type = 'Movement' portal_type = 'Movement'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
...@@ -198,6 +195,10 @@ class Movement(XMLObject, Amount): ...@@ -198,6 +195,10 @@ class Movement(XMLObject, Amount):
, PropertySheet.Price , PropertySheet.Price
) )
security.declareProtected(Permissions.AccessContentsInformation, 'isMovement')
def isMovement(self):
return 1
# Pricing methods # Pricing methods
# _getPrice is defined in the order / delivery # _getPrice is defined in the order / delivery
# Pricing mehod # Pricing mehod
......
...@@ -77,8 +77,6 @@ class NodeBudgetVariation(BudgetVariation): ...@@ -77,8 +77,6 @@ class NodeBudgetVariation(BudgetVariation):
meta_type = 'ERP5 Node Budget Variation' meta_type = 'ERP5 Node Budget Variation'
portal_type = 'Node Budget Variation' portal_type = 'Node Budget Variation'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -31,6 +31,7 @@ from Products.ERP5Type.Globals import InitializeClass, PersistentMapping ...@@ -31,6 +31,7 @@ from Products.ERP5Type.Globals import InitializeClass, PersistentMapping
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.Delivery import Delivery from Products.ERP5.Document.Delivery import Delivery
class OpenOrder(Delivery): class OpenOrder(Delivery):
...@@ -39,7 +40,7 @@ class OpenOrder(Delivery): ...@@ -39,7 +40,7 @@ class OpenOrder(Delivery):
""" """
meta_type = 'ERP5 Open Order' meta_type = 'ERP5 Open Order'
portal_type = 'Open Order' portal_type = 'Open Order'
isPredicate = 1 # XXX - Why ? isPredicate = ConstantGetter('isPredicate', value=True) # XXX - Why ?
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -39,8 +39,6 @@ class OpenOrderCell(SupplyCell): ...@@ -39,8 +39,6 @@ class OpenOrderCell(SupplyCell):
meta_type = 'ERP5 Open Order Cell' meta_type = 'ERP5 Open Order Cell'
portal_type = 'Open Order Cell' portal_type = 'Open Order Cell'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -40,9 +40,6 @@ class OpenOrderLine(SupplyLine): ...@@ -40,9 +40,6 @@ class OpenOrderLine(SupplyLine):
meta_type = 'ERP5 Open Order Line' meta_type = 'ERP5 Open Order Line'
portal_type = 'Open Order Line' portal_type = 'Open Order Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isPredicate = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -41,7 +41,6 @@ class Order(Delivery): ...@@ -41,7 +41,6 @@ class Order(Delivery):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Order' meta_type = 'ERP5 Order'
portal_type = 'Order' portal_type = 'Order'
isDelivery = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -54,8 +54,6 @@ class Organisation(XMLObject): ...@@ -54,8 +54,6 @@ class Organisation(XMLObject):
meta_type = 'ERP5 Organisation' meta_type = 'ERP5 Organisation'
portal_type = 'Organisation' portal_type = 'Organisation'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -49,8 +49,6 @@ class PDFDocument(Image, CachedConvertableMixin): ...@@ -49,8 +49,6 @@ class PDFDocument(Image, CachedConvertableMixin):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 PDF Document' meta_type = 'ERP5 PDF Document'
portal_type = 'PDF' portal_type = 'PDF'
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -40,8 +40,6 @@ class PDFTypeInformation(ERP5TypeInformation): ...@@ -40,8 +40,6 @@ class PDFTypeInformation(ERP5TypeInformation):
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 PDF Type Information' meta_type = 'ERP5 PDF Type Information'
portal_type = 'PDF Type' portal_type = 'PDF Type'
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -63,7 +63,6 @@ class PackingList(Delivery): ...@@ -63,7 +63,6 @@ class PackingList(Delivery):
meta_type = 'ERP5 Packing List' meta_type = 'ERP5 Packing List'
portal_type = 'Packing List' portal_type = 'Packing List'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isDelivery = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -50,8 +50,6 @@ class Path(MappedValue): ...@@ -50,8 +50,6 @@ class Path(MappedValue):
meta_type = 'ERP5 Path' meta_type = 'ERP5 Path'
portal_type = 'Path' portal_type = 'Path'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -39,10 +39,7 @@ class PaySheetCell(InvoiceCell): ...@@ -39,10 +39,7 @@ class PaySheetCell(InvoiceCell):
meta_type = 'ERP5 Pay Sheet Cell' meta_type = 'ERP5 Pay Sheet Cell'
portal_type = 'Pay Sheet Cell' portal_type = 'Pay Sheet Cell'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isCell = 1 isCell = 1
isMovement = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
...@@ -42,8 +42,6 @@ class PaySheetLine(InvoiceLine): ...@@ -42,8 +42,6 @@ class PaySheetLine(InvoiceLine):
meta_type = 'ERP5 Pay Sheet Line' meta_type = 'ERP5 Pay Sheet Line'
portal_type = 'Pay Sheet Line' portal_type = 'Pay Sheet Line'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
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.
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.
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