Commit 08199ac2 authored by Ayush Tiwari's avatar Ayush Tiwari

BusinessTemplate: remove useless properties for ERP5 SQL Method during export/build

parent 82961a85
...@@ -38,6 +38,7 @@ from AccessControl import ClassSecurityInfo, Unauthorized, getSecurityManager ...@@ -38,6 +38,7 @@ from AccessControl import ClassSecurityInfo, Unauthorized, getSecurityManager
from AccessControl.SecurityInfo import ModuleSecurityInfo from AccessControl.SecurityInfo import ModuleSecurityInfo
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.PythonScripts.PythonScript import PythonScript from Products.PythonScripts.PythonScript import PythonScript
from Products.ZSQLMethods.SQL import SQL
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Cache import transactional_cached from Products.ERP5Type.Cache import transactional_cached
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
...@@ -621,7 +622,8 @@ class BaseTemplateItem(Implicit, Persistent): ...@@ -621,7 +622,8 @@ class BaseTemplateItem(Implicit, Persistent):
delattr(obj, attr) delattr(obj, attr)
elif classname in ('File', 'Image'): elif classname in ('File', 'Image'):
attr_set.update(('_EtagSupport__etag', 'size')) attr_set.update(('_EtagSupport__etag', 'size'))
elif classname == 'SQL' and klass.__module__== 'Products.ZSQLMethods.SQL': # SQL covers both ZSQL Methods and ERP5 SQL Methods
elif isinstance(obj, SQL):
attr_set.update(('_arg', 'template')) attr_set.update(('_arg', 'template'))
elif interfaces.IIdGenerator.providedBy(obj): elif interfaces.IIdGenerator.providedBy(obj):
attr_set.update(('last_max_id_dict', 'last_id_dict')) attr_set.update(('last_max_id_dict', 'last_id_dict'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment