[Erp5-report] r33927 jerome - /erp5/trunk/products/ERP5Type/Tool/ClassTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Mar 19 18:47:53 CET 2010
Author: jerome
Date: Fri Mar 19 18:47:53 2010
New Revision: 33927
URL: http://svn.erp5.org?rev=33927&view=rev
Log:
- generate code indented with 2 spaces
- use "error_list" instead of "errors"
Modified:
erp5/trunk/products/ERP5Type/Tool/ClassTool.py
Modified: erp5/trunk/products/ERP5Type/Tool/ClassTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/ClassTool.py?rev=33927&r1=33926&r2=33927&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/ClassTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Tool/ClassTool.py [utf8] Fri Mar 19 18:47:53 2010
@@ -336,19 +336,19 @@
from Products.ERP5Type.XMLObject import XMLObject
class %s(XMLObject):
- # CMF Type Definition
- meta_type = 'MYPROJECT Template Document'
- portal_type = 'Template Document'
-
- # Declarative security
- security = ClassSecurityInfo()
- security.declareObjectProtected(Permissions.AccessContentsInformation)
-
- # Default Properties
- property_sheets = ( PropertySheet.Base
- , PropertySheet.XMLObject
- , PropertySheet.CategoryCore
- , PropertySheet.DublinCore
+ # CMF Type Definition
+ meta_type = 'MYPROJECT Template Document'
+ portal_type = 'Template Document'
+
+ # Declarative security
+ security = ClassSecurityInfo()
+ security.declareObjectProtected(Permissions.AccessContentsInformation)
+
+ # Default Properties
+ property_sheets = ( PropertySheet.Base
+ , PropertySheet.XMLObject
+ , PropertySheet.CategoryCore
+ , PropertySheet.DublinCore
)""" % (COPYRIGHT, class_id)
self.writeLocalDocument(class_id, text)
if REQUEST is not None:
@@ -423,16 +423,16 @@
##############################################################################
class %s:
- \"\"\"
- %s properties for all ERP5 objects
- \"\"\"
-
- _properties = (
- { 'id' : 'a_property',
- 'description' : 'A local property description',
- 'type' : 'string',
- 'mode' : '' },
- )
+ \"\"\"
+ %s properties for all ERP5 objects
+ \"\"\"
+
+ _properties = (
+ { 'id' : 'a_property',
+ 'description' : 'A local property description',
+ 'type' : 'string',
+ 'mode' : '' },
+ )
""" % (COPYRIGHT, class_id, class_id)
@@ -660,22 +660,22 @@
from Products.ERP5Type.Constraint import Constraint
class %s(Constraint):
+ \"\"\"
+ Explain here what this constraint checker does
+ \"\"\"
+
+ def checkConsistency(self, obj, fixit = 0):
\"\"\"
- Explain here what this constraint checker does
+ Implement here the consistency checker
+ whenever fixit is not 0, object data should be updated to
+ satisfy the constraint
\"\"\"
- def checkConsistency(self, obj, fixit = 0):
- \"\"\"
- Implement here the consistency checker
- whenever fixit is not 0, object data should be updated to
- satisfy the constraint
- \"\"\"
-
- errors = []
-
- # Do the job here
-
- return errors
+ error_list = []
+
+ # Do the job here
+
+ return error_list
""" % (COPYRIGHT, class_id)
self.writeLocalConstraint(class_id, text)
if REQUEST is not None:
More information about the Erp5-report
mailing list