[Erp5-report] r42911 nicolas.dumazet - /erp5/trunk/products/ERP5Type/dynamic/lazy_class.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Feb 2 02:00:03 CET 2011


Author: nicolas.dumazet
Date: Wed Feb  2 02:00:03 2011
New Revision: 42911

URL: http://svn.erp5.org?rev=42911&view=rev
Log:
avoid creating doNothing methods for Base Types

Modified:
    erp5/trunk/products/ERP5Type/dynamic/lazy_class.py

Modified: erp5/trunk/products/ERP5Type/dynamic/lazy_class.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/dynamic/lazy_class.py?rev=42911&r1=42910&r2=42911&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/dynamic/lazy_class.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/dynamic/lazy_class.py [utf8] Wed Feb  2 02:00:03 2011
@@ -318,7 +318,12 @@ class PortalTypeMetaClass(GhostBaseMetaC
         for interface in interface_list:
           classImplements(klass, interface)
 
-        klass.generatePortalTypeAccessors(site)
+        if len(base_tuple) > 1:
+          # skip this during the early Base Type / Types Tool generation
+          # because they dont have accessors, and will mess up
+          # workflow methods. We KNOW that we will re-load this type
+          # anyway
+          klass.generatePortalTypeAccessors(site)
       except Exception:
         import traceback; traceback.print_exc()
     finally:



More information about the Erp5-report mailing list