[Erp5-report] r41007 arnaud.fontaine - in /erp5/trunk/products: ERP5/Document/ ERP5Type/Cor...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 2 02:40:45 CET 2010


Author: arnaud.fontaine
Date: Thu Dec  2 02:40:44 2010
New Revision: 41007

URL: http://svn.erp5.org?rev=41007&view=rev
Log:
Define common Property Sheets within the Constraint mixin rather than
defining them in each Constraint


Modified:
    erp5/trunk/products/ERP5/Document/AccountingTransactionBalanceConstraint.py
    erp5/trunk/products/ERP5/Document/ResourceMeasuresConsistencyConstraint.py
    erp5/trunk/products/ERP5/Document/TradeModelLineCellConsistencyConstraint.py
    erp5/trunk/products/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py
    erp5/trunk/products/ERP5/Document/TransactionQuantityValueValidityConstraint.py
    erp5/trunk/products/ERP5Type/Core/AttributeEqualityConstraint.py
    erp5/trunk/products/ERP5Type/Core/CategoryExistenceConstraint.py
    erp5/trunk/products/ERP5Type/Core/CategoryMembershipArityConstraint.py
    erp5/trunk/products/ERP5Type/Core/ContentExistenceConstraint.py
    erp5/trunk/products/ERP5Type/Core/PropertyExistenceConstraint.py
    erp5/trunk/products/ERP5Type/Core/PropertyTypeValidityConstraint.py
    erp5/trunk/products/ERP5Type/Core/TALESConstraint.py
    erp5/trunk/products/ERP5Type/mixin/constraint.py

Modified: erp5/trunk/products/ERP5/Document/AccountingTransactionBalanceConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/AccountingTransactionBalanceConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/AccountingTransactionBalanceConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/AccountingTransactionBalanceConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -41,10 +41,8 @@ class AccountingTransactionBalanceConstr
   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):
     """

Modified: erp5/trunk/products/ERP5/Document/ResourceMeasuresConsistencyConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/ResourceMeasuresConsistencyConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/ResourceMeasuresConsistencyConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/ResourceMeasuresConsistencyConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -43,10 +43,8 @@ class ResourceMeasuresConsistencyConstra
   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):
     """

Modified: erp5/trunk/products/ERP5/Document/TradeModelLineCellConsistencyConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeModelLineCellConsistencyConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeModelLineCellConsistencyConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeModelLineCellConsistencyConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -42,10 +42,8 @@ class TradeModelLineCellConsistencyConst
   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):
     """

Modified: erp5/trunk/products/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TransactionQuantityValueFeasabilityConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -41,10 +41,6 @@ class TransactionQuantityValueFeasabilit
     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

Modified: erp5/trunk/products/ERP5/Document/TransactionQuantityValueValidityConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransactionQuantityValueValidityConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransactionQuantityValueValidityConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TransactionQuantityValueValidityConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -38,10 +38,6 @@ class TransactionQuantityValueValidityCo
     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

Modified: erp5/trunk/products/ERP5Type/Core/AttributeEqualityConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/AttributeEqualityConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/AttributeEqualityConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/AttributeEqualityConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -59,10 +59,8 @@ class AttributeEqualityConstraint(Constr
   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')

Modified: erp5/trunk/products/ERP5Type/Core/CategoryExistenceConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/CategoryExistenceConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/CategoryExistenceConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/CategoryExistenceConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -48,10 +48,8 @@ class CategoryExistenceConstraint(Constr
   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,

Modified: erp5/trunk/products/ERP5Type/Core/CategoryMembershipArityConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/CategoryMembershipArityConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/CategoryMembershipArityConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/CategoryMembershipArityConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -56,10 +56,8 @@ class CategoryMembershipArityConstraint(
   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,

Modified: erp5/trunk/products/ERP5Type/Core/ContentExistenceConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/ContentExistenceConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/ContentExistenceConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/ContentExistenceConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -57,10 +57,8 @@ class ContentExistenceConstraint(Constra
   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):
     """

Modified: erp5/trunk/products/ERP5Type/Core/PropertyExistenceConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/PropertyExistenceConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/PropertyExistenceConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/PropertyExistenceConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -54,10 +54,8 @@ class PropertyExistenceConstraint(Constr
   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')

Modified: erp5/trunk/products/ERP5Type/Core/PropertyTypeValidityConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/PropertyTypeValidityConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/PropertyTypeValidityConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/PropertyTypeValidityConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -44,10 +44,8 @@ class PropertyTypeValidityConstraint(Con
   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 = {

Modified: erp5/trunk/products/ERP5Type/Core/TALESConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/TALESConstraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/TALESConstraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/TALESConstraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -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):
     """

Modified: erp5/trunk/products/ERP5Type/mixin/constraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/mixin/constraint.py?rev=41007&r1=41006&r2=41007&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/mixin/constraint.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/mixin/constraint.py [utf8] Thu Dec  2 02:40:44 2010
@@ -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.



More information about the Erp5-report mailing list