diff --git a/product/ERP5/Document/AccountingTransactionBalanceConstraint.py b/product/ERP5/Document/AccountingTransactionBalanceConstraint.py index e1a3b7cac3fc525e5d34fdfb7a2af1d241b7d90a..53ab1ef2204537c40b4f1eaef7f807c138b49e31 100644 --- a/product/ERP5/Document/AccountingTransactionBalanceConstraint.py +++ b/product/ERP5/Document/AccountingTransactionBalanceConstraint.py @@ -41,10 +41,8 @@ class AccountingTransactionBalanceConstraint(ConstraintMixin): meta_type = 'ERP5 Accounting Transaction Balance Constraint' portal_type = 'Accounting Transaction Balance Constraint' - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.AccountingTransactionBalanceConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.AccountingTransactionBalanceConstraint,) def _checkConsistency(self, obj, fixit=0): """ diff --git a/product/ERP5/Document/ResourceMeasuresConsistencyConstraint.py b/product/ERP5/Document/ResourceMeasuresConsistencyConstraint.py index d8c65008feb77ef5b8bbafd6d2f85fca1838a239..b9e63664bc34b854d9469e4f3c0edf25160c4441 100644 --- a/product/ERP5/Document/ResourceMeasuresConsistencyConstraint.py +++ b/product/ERP5/Document/ResourceMeasuresConsistencyConstraint.py @@ -43,10 +43,8 @@ class ResourceMeasuresConsistencyConstraint(ConstraintMixin): meta_type = 'ERP5 Resource Measures Consistency Constraint' portal_type = 'Resource Measures Consistency Constraint' - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.ResourceMeasuresConsistencyConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.ResourceMeasuresConsistencyConstraint,) def _checkConsistency(self, obj, fixit=0): """ diff --git a/product/ERP5/Document/TradeModelLineCellConsistencyConstraint.py b/product/ERP5/Document/TradeModelLineCellConsistencyConstraint.py index 1c37dca91d3bc0329952c99e1c6cae01578dfadc..3684b742aa491a038ea20b4ba0affdb935fef367 100644 --- a/product/ERP5/Document/TradeModelLineCellConsistencyConstraint.py +++ b/product/ERP5/Document/TradeModelLineCellConsistencyConstraint.py @@ -42,10 +42,8 @@ class TradeModelLineCellConsistencyConstraint(ConstraintMixin): meta_type = 'ERP5 Trade Model Line Cell Consistency Constraint' portal_type = 'Trade Model Line Cell Consistency Constraint' - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.TradeModelLineCellConsistencyConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.TradeModelLineCellConsistencyConstraint,) def _checkConsistency(self, document, fixit=0): """ diff --git a/product/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py b/product/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py index 304754e7cdac1547c22d2500772d0de60418dfac..d3b6fb8e8b2ef6e060fd7b1823e75d133f579995 100644 --- a/product/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py +++ b/product/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py @@ -41,10 +41,6 @@ class TransactionQuantityValueFeasabilityConstraint(ConstraintMixin): meta_type = 'ERP5 Transaction Quantity Value Feasability Constraint' portal_type = 'Transaction Quantity Value Feasability Constraint' - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference) - def _checkConsistency(self, object, fixit=0): """ Check if the quantity of the transaction is possible diff --git a/product/ERP5/Document/TransactionQuantityValueValidityConstraint.py b/product/ERP5/Document/TransactionQuantityValueValidityConstraint.py index a04afa173dc9a90855181c5309028dba37b0bab9..6d04e76b558312b24047d93fc3fda972edc0d7d4 100644 --- a/product/ERP5/Document/TransactionQuantityValueValidityConstraint.py +++ b/product/ERP5/Document/TransactionQuantityValueValidityConstraint.py @@ -38,10 +38,6 @@ class TransactionQuantityValueValidityConstraint(ConstraintMixin): meta_type = 'ERP5 Transaction Quantity Value Validity Constraint' portal_type = 'Transaction Quantity Value Validity Constraint' - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference) - def _checkConsistency(self, object, fixit=0): """ Check if the quantity of the transaction is greater than the diff --git a/product/ERP5Type/Core/AttributeEqualityConstraint.py b/product/ERP5Type/Core/AttributeEqualityConstraint.py index 187380f146ef6fcddbcc6f08fef396b1fe811833..c0779ac408428c7b7c6aed43267c9bd8a000b400 100644 --- a/product/ERP5Type/Core/AttributeEqualityConstraint.py +++ b/product/ERP5Type/Core/AttributeEqualityConstraint.py @@ -59,10 +59,8 @@ class AttributeEqualityConstraint(ConstraintMixin): security = ClassSecurityInfo() security.declareObjectProtected(Permissions.AccessContentsInformation) - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.AttributeEqualityConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.AttributeEqualityConstraint,) security.declareProtected(Permissions.AccessContentsInformation, 'checkConsistency') diff --git a/product/ERP5Type/Core/CategoryExistenceConstraint.py b/product/ERP5Type/Core/CategoryExistenceConstraint.py index 1f82938c2e5631f76ebf4bca8054a7fac7c99fe7..22ff0399e6fd4ad6ec83dbc3f9ab61d6f7c2137c 100644 --- a/product/ERP5Type/Core/CategoryExistenceConstraint.py +++ b/product/ERP5Type/Core/CategoryExistenceConstraint.py @@ -48,10 +48,8 @@ class CategoryExistenceConstraint(ConstraintMixin): security = ClassSecurityInfo() security.declareObjectProtected(Permissions.AccessContentsInformation) - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.CategoryExistenceConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.CategoryExistenceConstraint,) def _calculateArity(self, obj, base_category, portal_type_list): return len(obj.getCategoryMembershipList(base_category, diff --git a/product/ERP5Type/Core/CategoryMembershipArityConstraint.py b/product/ERP5Type/Core/CategoryMembershipArityConstraint.py index cbe62fc069150c6418a74aa9cdf0cb03d77d262c..26e6f931a205bd579075da69a80f74ebf38ff3ae 100644 --- a/product/ERP5Type/Core/CategoryMembershipArityConstraint.py +++ b/product/ERP5Type/Core/CategoryMembershipArityConstraint.py @@ -56,10 +56,8 @@ class CategoryMembershipArityConstraint(ConstraintMixin): security = ClassSecurityInfo() security.declareObjectProtected(Permissions.AccessContentsInformation) - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.CategoryMembershipArityConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.CategoryMembershipArityConstraint,) def _calculateArity(self, obj, base_category_list, portal_type_list): return len(obj.getCategoryMembershipList(base_category_list, diff --git a/product/ERP5Type/Core/ContentExistenceConstraint.py b/product/ERP5Type/Core/ContentExistenceConstraint.py index 5298fbf0633113effd5fa71d738e51aa625620c6..fc77cd3f4eaf7493401bc3af4771126333334285 100644 --- a/product/ERP5Type/Core/ContentExistenceConstraint.py +++ b/product/ERP5Type/Core/ContentExistenceConstraint.py @@ -57,10 +57,8 @@ class ContentExistenceConstraint(ConstraintMixin): security = ClassSecurityInfo() security.declareObjectProtected(Permissions.AccessContentsInformation) - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.ContentExistenceConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.ContentExistenceConstraint,) def _checkConsistency(self, obj, fixit=0): """ diff --git a/product/ERP5Type/Core/PropertyExistenceConstraint.py b/product/ERP5Type/Core/PropertyExistenceConstraint.py index 98468ad76d664b026aaeb79871cf94ddd1bf4632..805f5727fc336e38ad94497c39f3b0d263e53a4a 100644 --- a/product/ERP5Type/Core/PropertyExistenceConstraint.py +++ b/product/ERP5Type/Core/PropertyExistenceConstraint.py @@ -54,10 +54,8 @@ class PropertyExistenceConstraint(ConstraintMixin): security = ClassSecurityInfo() security.declareObjectProtected(Permissions.AccessContentsInformation) - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.PropertyExistenceConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.PropertyExistenceConstraint,) security.declareProtected(Permissions.AccessContentsInformation, 'checkConsistency') diff --git a/product/ERP5Type/Core/PropertyTypeValidityConstraint.py b/product/ERP5Type/Core/PropertyTypeValidityConstraint.py index 4e7dab368015494823be95bec628b1319a2bad7d..a8946b9bd5f55966703b91d229522ab021763a03 100644 --- a/product/ERP5Type/Core/PropertyTypeValidityConstraint.py +++ b/product/ERP5Type/Core/PropertyTypeValidityConstraint.py @@ -44,10 +44,8 @@ class PropertyTypeValidityConstraint(ConstraintMixin): meta_type = 'ERP5 Property Type Validity Constraint' portal_type = 'Property Type Validity Constraint' - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.PropertyTypeValidityConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.PropertyTypeValidityConstraint,) # Initialize type dict _type_dict = { diff --git a/product/ERP5Type/Core/TALESConstraint.py b/product/ERP5Type/Core/TALESConstraint.py index d713b5a119fb749e283d5be26b045164c0ccacf4..b0c18668f108a76b187f690d140f93b7238f11f1 100644 --- a/product/ERP5Type/Core/TALESConstraint.py +++ b/product/ERP5Type/Core/TALESConstraint.py @@ -61,10 +61,8 @@ class TALESConstraint(ConstraintMixin): meta_type = 'ERP5 TALES Constraint' portal_type = 'TALES Constraint' - property_sheets = (PropertySheet.SimpleItem, - PropertySheet.Predicate, - PropertySheet.Reference, - PropertySheet.TALESConstraint) + property_sheets = ConstraintMixin.property_sheets + \ + (PropertySheet.TALESConstraint,) def _checkConsistency(self, obj, fixit=0): """ diff --git a/product/ERP5Type/mixin/constraint.py b/product/ERP5Type/mixin/constraint.py index e9529a4584a2a6d59966064d2a2add6b28d5f755..23bdfa9c527e51e530cf03da5a75fdc12466e617 100644 --- a/product/ERP5Type/mixin/constraint.py +++ b/product/ERP5Type/mixin/constraint.py @@ -55,6 +55,10 @@ class ConstraintMixin(Predicate): __allow_access_to_unprotected_subobjects__ = 1 implements( IConstraint, ) + property_sheets = (PropertySheet.SimpleItem, + PropertySheet.Predicate, + PropertySheet.Reference) + def _getMessage(self, message_id): """ Get the message corresponding to this message_id.