[Erp5-report] r38600 nicolas.dumazet - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 23 19:28:56 CEST 2010
Author: nicolas.dumazet
Date: Thu Sep 23 19:28:56 2010
New Revision: 38600
URL: http://svn.erp5.org?rev=38600&view=rev
Log:
only do cleanups at export time: examining interfaces when importing a bt is harmful as it
forces us to load the object very early (before build, before install)
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=38600&r1=38599&r2=38600&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Thu Sep 23 19:28:56 2010
@@ -598,6 +598,11 @@ class BaseTemplateItem(Implicit, Persist
#'Z SQL Method': ('_arg', 'template',),
}.get(meta_type, ()))
+ if interfaces.IIdGenerator.providedBy(obj):
+ for dict_name in ('last_max_id_dict', 'last_id_dict'):
+ if getattr(obj, dict_name, None) is not None:
+ delattr(obj, dict_name)
+
for attr in obj.__dict__.keys():
if attr in attr_set or attr.startswith('_cache_cookie_'):
delattr(obj, attr)
@@ -613,10 +618,6 @@ class BaseTemplateItem(Implicit, Persist
else:
# save result of automatic compilation
obj._p_changed = 1
- elif interfaces.IIdGenerator.providedBy(obj):
- for dict_name in ('last_max_id_dict', 'last_id_dict'):
- if getattr(obj, dict_name, None) is not None:
- delattr(obj, dict_name)
return obj
def getTemplateTypeName(self):
More information about the Erp5-report
mailing list