Commit 6890aa5c authored by Jean-Paul Smets's avatar Jean-Paul Smets

Naming convention: SQL should be in big caps.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11869 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cdac6e8d
...@@ -414,15 +414,15 @@ class Category(Folder): ...@@ -414,15 +414,15 @@ class Category(Folder):
""" """
return context.isMemberOf(self.getCategoryName()) return context.isMemberOf(self.getCategoryName())
security.declareProtected( Permissions.AccessContentsInformation, 'asSqlExpression' ) security.declareProtected( Permissions.AccessContentsInformation, 'asSQLExpression' )
def asSqlExpression(self, strict_membership=0, table='category', base_category = None): def asSQLExpression(self, strict_membership=0, table='category', base_category = None):
""" """
A Predicate can be rendered as an sql expression. This A Predicate can be rendered as an sql expression. This
can be useful to create reporting trees based on the can be useful to create reporting trees based on the
ZSQLCatalog ZSQLCatalog
""" """
#LOG('Category.asSqlExpression self', 0, str(self)) #LOG('Category.asSQLExpression self', 0, str(self))
#LOG('asSqlExpression parent', 0, str(self.aq_parent)) #LOG('asSQLExpression parent', 0, str(self.aq_parent))
if base_category is None: if base_category is None:
base_category = self base_category = self
elif type(base_category) is type('a'): elif type(base_category) is type('a'):
...@@ -437,7 +437,7 @@ class Category(Folder): ...@@ -437,7 +437,7 @@ class Category(Folder):
(table, self.getUid(), table, base_category.getBaseCategoryUid()) (table, self.getUid(), table, base_category.getBaseCategoryUid())
# Now useless since we precompute the mapping # Now useless since we precompute the mapping
#for o in self.objectValues(): #for o in self.objectValues():
# sql_text += ' OR %s' % o.asSqlExpression() # sql_text += ' OR %s' % o.asSQLExpression()
return sql_text return sql_text
# A Category's categories is self # A Category's categories is self
...@@ -553,7 +553,7 @@ class BaseCategory(Category): ...@@ -553,7 +553,7 @@ class BaseCategory(Category):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
def asSqlExpression(self, strict_membership=0, table='category', base_category=None): def asSQLExpression(self, strict_membership=0, table='category', base_category=None):
""" """
A Predicate can be rendered as an sql expression. This A Predicate can be rendered as an sql expression. This
can be useful to create reporting trees based on the can be useful to create reporting trees based on the
...@@ -568,7 +568,7 @@ class BaseCategory(Category): ...@@ -568,7 +568,7 @@ class BaseCategory(Category):
(table, self.uid, table, self.uid) (table, self.uid, table, self.uid)
# Now useless since we precompute the mapping # Now useless since we precompute the mapping
#for o in self.objectValues(): #for o in self.objectValues():
# sql_text += ' OR %s' % o.asSqlExpression() # sql_text += ' OR %s' % o.asSQLExpression()
return sql_text return sql_text
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
......
...@@ -84,7 +84,7 @@ class Filter(Implicit): ...@@ -84,7 +84,7 @@ class Filter(Implicit):
""" """
return self.filter_dict return self.filter_dict
def asSql(self): def asSQL(self):
""" """
Returns an SQL expression which can be used as a query Returns an SQL expression which can be used as a query
""" """
......
...@@ -51,7 +51,7 @@ class Predicate(Interface): ...@@ -51,7 +51,7 @@ class Predicate(Interface):
""" """
pass pass
def asSqlExpression(): def asSQLExpression():
""" """
A Predicate can be rendered as an sql expression. This A Predicate can be rendered as an sql expression. This
can be useful to create reporting trees based on the can be useful to create reporting trees based on the
......
...@@ -235,7 +235,7 @@ class SimulationTool (BaseTool): ...@@ -235,7 +235,7 @@ class SimulationTool (BaseTool):
# keywords for related keys # keywords for related keys
**kw): **kw):
""" """
generates keywords and calls buildSqlQuery generates keywords and calls buildSQLQuery
""" """
new_kw = {} new_kw = {}
new_kw.update(kw) new_kw.update(kw)
...@@ -575,7 +575,7 @@ class SimulationTool (BaseTool): ...@@ -575,7 +575,7 @@ class SimulationTool (BaseTool):
**kw - if we want extended selection with more keywords (but **kw - if we want extended selection with more keywords (but
bad performance) check what we can do with bad performance) check what we can do with
buildSqlQuery buildSQLQuery
NOTE: we may want to define a parameter so that we can select the kind of NOTE: we may want to define a parameter so that we can select the kind of
inventory statistics we want to display (ex. sum, average, cost, etc.) inventory statistics we want to display (ex. sum, average, cost, etc.)
...@@ -1040,7 +1040,7 @@ class SimulationTool (BaseTool): ...@@ -1040,7 +1040,7 @@ class SimulationTool (BaseTool):
selection_domain, selection_report - see ListBox selection_domain, selection_report - see ListBox
**kw - if we want extended selection with more keywords (but bad performance) **kw - if we want extended selection with more keywords (but bad performance)
check what we can do with buildSqlQuery check what we can do with buildSQLQuery
Extra parameters for getTrackingList : Extra parameters for getTrackingList :
......
...@@ -1381,7 +1381,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1381,7 +1381,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
self.failUnless(self.getCategoryTool() != None) self.failUnless(self.getCategoryTool() != None)
self.failUnless(self.getSimulationTool() != None) self.failUnless(self.getSimulationTool() != None)
self.failUnless(self.getTypeTool() != None) self.failUnless(self.getTypeTool() != None)
self.failUnless(self.getSqlConnection() != None) self.failUnless(self.getSQLConnection() != None)
self.failUnless(self.getCatalogTool() != None) self.failUnless(self.getCatalogTool() != None)
self.failUnless(self.getRuleTool() != None) self.failUnless(self.getRuleTool() != None)
self.failUnless(self.getAccountModule() != None) self.failUnless(self.getAccountModule() != None)
......
...@@ -89,7 +89,7 @@ class TestAlarm(ERP5TypeTestCase): ...@@ -89,7 +89,7 @@ class TestAlarm(ERP5TypeTestCase):
self.failUnless(self.getCategoryTool()!=None) self.failUnless(self.getCategoryTool()!=None)
self.failUnless(self.getSimulationTool()!=None) self.failUnless(self.getSimulationTool()!=None)
self.failUnless(self.getTypeTool()!=None) self.failUnless(self.getTypeTool()!=None)
self.failUnless(self.getSqlConnection()!=None) self.failUnless(self.getSQLConnection()!=None)
self.failUnless(self.getCatalogTool()!=None) self.failUnless(self.getCatalogTool()!=None)
#def populate(self, quiet=1, run=1): #def populate(self, quiet=1, run=1):
......
...@@ -83,7 +83,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -83,7 +83,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
portal = self.getPortal() portal = self.getPortal()
catalog_tool = self.getCatalogTool() catalog_tool = self.getCatalogTool()
# create the fake catalog table # create the fake catalog table
sql_connection = self.getSqlConnection() sql_connection = self.getSQLConnection()
sql = 'create table if not exists `fake_catalog` (`toto` BIGINT)' sql = 'create table if not exists `fake_catalog` (`toto` BIGINT)'
sql_connection.manage_test(sql) sql_connection.manage_test(sql)
self._catch_log_errors() self._catch_log_errors()
......
...@@ -100,31 +100,31 @@ class Test(ERP5TypeTestCase): ...@@ -100,31 +100,31 @@ class Test(ERP5TypeTestCase):
user = uf.getUserById(username).__of__(uf) user = uf.getUserById(username).__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def getSqlPathList(self): def getSQLPathList(self):
""" """
Give the full list of path in the catalog Give the full list of path in the catalog
""" """
sql_connection = self.getSqlConnection() sql_connection = self.getSQLConnection()
sql = 'select path from catalog' sql = 'select path from catalog'
result = sql_connection.manage_test(sql) result = sql_connection.manage_test(sql)
path_list = map(lambda x: x['path'],result) path_list = map(lambda x: x['path'],result)
return path_list return path_list
def checkRelativeUrlInSqlPathList(self,url_list): def checkRelativeUrlInSQLPathList(self,url_list):
path_list = self.getSqlPathList() path_list = self.getSQLPathList()
portal_id = self.getPortalId() portal_id = self.getPortalId()
for url in url_list: for url in url_list:
path = '/' + portal_id + '/' + url path = '/' + portal_id + '/' + url
self.failUnless(path in path_list) self.failUnless(path in path_list)
LOG('checkRelativeUrlInSqlPathList found path:',0,path) LOG('checkRelativeUrlInSQLPathList found path:',0,path)
def checkRelativeUrlNotInSqlPathList(self,url_list): def checkRelativeUrlNotInSQLPathList(self,url_list):
path_list = self.getSqlPathList() path_list = self.getSQLPathList()
portal_id = self.getPortalId() portal_id = self.getPortalId()
for url in url_list: for url in url_list:
path = '/' + portal_id + '/' + url path = '/' + portal_id + '/' + url
self.failUnless(path not in path_list) self.failUnless(path not in path_list)
LOG('checkRelativeUrlInSqlPathList not found path:',0,path) LOG('checkRelativeUrlInSQLPathList not found path:',0,path)
def test_01_StandardSearchFolder(self, quiet=0, run=run_all_test): def test_01_StandardSearchFolder(self, quiet=0, run=run_all_test):
......
...@@ -84,31 +84,31 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -84,31 +84,31 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
user = uf.getUserById('seb').__of__(uf) user = uf.getUserById('seb').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def getSqlPathList(self): def getSQLPathList(self):
""" """
Give the full list of path in the catalog Give the full list of path in the catalog
""" """
sql_connection = self.getSqlConnection() sql_connection = self.getSQLConnection()
sql = 'select path from catalog' sql = 'select path from catalog'
result = sql_connection.manage_test(sql) result = sql_connection.manage_test(sql)
path_list = map(lambda x: x['path'],result) path_list = map(lambda x: x['path'],result)
return path_list return path_list
def checkRelativeUrlInSqlPathList(self,url_list): def checkRelativeUrlInSQLPathList(self,url_list):
path_list = self.getSqlPathList() path_list = self.getSQLPathList()
portal_id = self.getPortalId() portal_id = self.getPortalId()
for url in url_list: for url in url_list:
path = '/' + portal_id + '/' + url path = '/' + portal_id + '/' + url
self.failUnless(path in path_list) self.failUnless(path in path_list)
LOG('checkRelativeUrlInSqlPathList found path:',0,path) LOG('checkRelativeUrlInSQLPathList found path:',0,path)
def checkRelativeUrlNotInSqlPathList(self,url_list): def checkRelativeUrlNotInSQLPathList(self,url_list):
path_list = self.getSqlPathList() path_list = self.getSQLPathList()
portal_id = self.getPortalId() portal_id = self.getPortalId()
for url in url_list: for url in url_list:
path = '/' + portal_id + '/' + url path = '/' + portal_id + '/' + url
self.failUnless(path not in path_list) self.failUnless(path not in path_list)
LOG('checkRelativeUrlInSqlPathList not found path:',0,path) LOG('checkRelativeUrlInSQLPathList not found path:',0,path)
def test_01_HasEverything(self, quiet=quiet, run=run_all_test): def test_01_HasEverything(self, quiet=quiet, run=run_all_test):
if not run: return if not run: return
...@@ -118,7 +118,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -118,7 +118,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
self.failUnless(self.getCategoryTool()!=None) self.failUnless(self.getCategoryTool()!=None)
self.failUnless(self.getSimulationTool()!=None) self.failUnless(self.getSimulationTool()!=None)
self.failUnless(self.getTypeTool()!=None) self.failUnless(self.getTypeTool()!=None)
self.failUnless(self.getSqlConnection()!=None) self.failUnless(self.getSQLConnection()!=None)
self.failUnless(self.getCatalogTool()!=None) self.failUnless(self.getCatalogTool()!=None)
def test_02_EverythingCatalogued(self, quiet=quiet, run=run_all_test): def test_02_EverythingCatalogued(self, quiet=quiet, run=run_all_test):
...@@ -141,37 +141,37 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -141,37 +141,37 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
person_module = self.getPersonModule() person_module = self.getPersonModule()
person = person_module.newContent(id='1',portal_type='Person') person = person_module.newContent(id='1',portal_type='Person')
path_list = [person.getRelativeUrl()] path_list = [person.getRelativeUrl()]
self.checkRelativeUrlNotInSqlPathList(path_list) self.checkRelativeUrlNotInSQLPathList(path_list)
person.immediateReindexObject() person.immediateReindexObject()
self.checkRelativeUrlInSqlPathList(path_list) self.checkRelativeUrlInSQLPathList(path_list)
person_module.manage_delObjects('1') person_module.manage_delObjects('1')
get_transaction().commit() get_transaction().commit()
self.tic() self.tic()
self.checkRelativeUrlNotInSqlPathList(path_list) self.checkRelativeUrlNotInSQLPathList(path_list)
# Now we will ask to immediatly reindex # Now we will ask to immediatly reindex
person = person_module.newContent(id='2', person = person_module.newContent(id='2',
portal_type='Person', portal_type='Person',
immediate_reindex=1) immediate_reindex=1)
path_list = [person.getRelativeUrl()] path_list = [person.getRelativeUrl()]
self.checkRelativeUrlInSqlPathList(path_list) self.checkRelativeUrlInSQLPathList(path_list)
person.immediateReindexObject() person.immediateReindexObject()
self.checkRelativeUrlInSqlPathList(path_list) self.checkRelativeUrlInSQLPathList(path_list)
person_module.manage_delObjects('2') person_module.manage_delObjects('2')
get_transaction().commit() get_transaction().commit()
self.tic() self.tic()
self.checkRelativeUrlNotInSqlPathList(path_list) self.checkRelativeUrlNotInSQLPathList(path_list)
# Now we will try with the method deleteContent # Now we will try with the method deleteContent
person = person_module.newContent(id='3',portal_type='Person') person = person_module.newContent(id='3',portal_type='Person')
path_list = [person.getRelativeUrl()] path_list = [person.getRelativeUrl()]
self.checkRelativeUrlNotInSqlPathList(path_list) self.checkRelativeUrlNotInSQLPathList(path_list)
person.immediateReindexObject() person.immediateReindexObject()
self.checkRelativeUrlInSqlPathList(path_list) self.checkRelativeUrlInSQLPathList(path_list)
person_module.deleteContent('3') person_module.deleteContent('3')
# Now delete things is made with activities # Now delete things is made with activities
self.checkRelativeUrlNotInSqlPathList(path_list) self.checkRelativeUrlNotInSQLPathList(path_list)
get_transaction().commit() get_transaction().commit()
self.tic() self.tic()
self.checkRelativeUrlNotInSqlPathList(path_list) self.checkRelativeUrlNotInSQLPathList(path_list)
def test_04_SearchFolderWithDeletedObjects(self, quiet=quiet, run=run_all_test): def test_04_SearchFolderWithDeletedObjects(self, quiet=quiet, run=run_all_test):
if not run: return if not run: return
...@@ -401,7 +401,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -401,7 +401,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
# Clear catalog # Clear catalog
portal_catalog = self.getCatalogTool() portal_catalog = self.getCatalogTool()
portal_catalog.manage_catalogClear() portal_catalog.manage_catalogClear()
sql_connection = self.getSqlConnection() sql_connection = self.getSQLConnection()
sql = 'select count(*) from catalog where portal_type!=NULL' sql = 'select count(*) from catalog where portal_type!=NULL'
result = sql_connection.manage_test(sql) result = sql_connection.manage_test(sql)
message_count = result[0]['COUNT(*)'] message_count = result[0]['COUNT(*)']
...@@ -419,7 +419,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -419,7 +419,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
message_count = result[0]['COUNT(*)'] message_count = result[0]['COUNT(*)']
self.assertEquals(0, message_count) self.assertEquals(0, message_count)
# Check if object are catalogued # Check if object are catalogued
self.checkRelativeUrlInSqlPathList([ self.checkRelativeUrlInSQLPathList([
organisation.getRelativeUrl(), organisation.getRelativeUrl(),
'portal_categories/%s' % base_category.getRelativeUrl()]) 'portal_categories/%s' % base_category.getRelativeUrl()])
...@@ -454,7 +454,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -454,7 +454,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
# Clear catalog # Clear catalog
portal_catalog = self.getCatalogTool() portal_catalog = self.getCatalogTool()
portal_catalog.manage_catalogClear() portal_catalog.manage_catalogClear()
sql_connection = self.getSqlConnection() sql_connection = self.getSQLConnection()
sql = 'SELECT COUNT(*) FROM category '\ sql = 'SELECT COUNT(*) FROM category '\
'WHERE uid=%s and category_strict_membership = 1' %\ 'WHERE uid=%s and category_strict_membership = 1' %\
...@@ -521,7 +521,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -521,7 +521,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
LOG('Testing... ',0,message) LOG('Testing... ',0,message)
portal_catalog = self.getCatalogTool() portal_catalog = self.getCatalogTool()
portal = self.getPortal() portal = self.getPortal()
sql_connection = self.getSqlConnection() sql_connection = self.getSQLConnection()
module = portal.getDefaultModule('Organisation') module = portal.getDefaultModule('Organisation')
organisation = module.newContent(portal_type='Organisation',) organisation = module.newContent(portal_type='Organisation',)
...@@ -821,7 +821,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -821,7 +821,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_type='Person', portal_type='Person',
immediate_reindex=1) immediate_reindex=1)
path_list = [person.getRelativeUrl()] path_list = [person.getRelativeUrl()]
self.checkRelativeUrlInSqlPathList(path_list) self.checkRelativeUrlInSQLPathList(path_list)
# We will delete the connector # We will delete the connector
# in order to make sure it will not work any more # in order to make sure it will not work any more
portal = self.getPortal() portal = self.getPortal()
...@@ -1239,7 +1239,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -1239,7 +1239,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
get_transaction().commit() get_transaction().commit()
self.tic() self.tic()
path_list = [new_person.getRelativeUrl()] path_list = [new_person.getRelativeUrl()]
self.checkRelativeUrlInSqlPathList(path_list) self.checkRelativeUrlInSQLPathList(path_list)
def test_44_ParentRelatedKeys(self, quiet=quiet, run=run_all_test): def test_44_ParentRelatedKeys(self, quiet=quiet, run=run_all_test):
if not run: return if not run: return
......
...@@ -1150,7 +1150,7 @@ class Base( CopyContainer, ...@@ -1150,7 +1150,7 @@ class Base( CopyContainer,
""" """
return self return self
def asSqlExpression(self, strict_membership=0, table='category', base_category = None): def asSQLExpression(self, strict_membership=0, table='category', base_category = None):
""" """
Any document can be used as a Category. It can therefore Any document can be used as a Category. It can therefore
serve in a Predicate and must be rendered as an sql expression. This serve in a Predicate and must be rendered as an sql expression. This
...@@ -1171,8 +1171,8 @@ class Base( CopyContainer, ...@@ -1171,8 +1171,8 @@ class Base( CopyContainer,
return sql_text return sql_text
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'getParentSqlExpression' ) 'getParentSQLExpression' )
def getParentSqlExpression(self, table = 'catalog', strict_membership = 0): def getParentSQLExpression(self, table = 'catalog', strict_membership = 0):
""" """
Builds an SQL expression to search children and subclidren Builds an SQL expression to search children and subclidren
""" """
...@@ -1767,6 +1767,21 @@ class Base( CopyContainer, ...@@ -1767,6 +1767,21 @@ class Base( CopyContainer,
""" """
return self.title_and_id() return self.title_and_id()
security.declareProtected(Permissions.AccessContentsInformation,
'getTranslatedShortTitleOrId')
def getTranslatedShortTitleOrId(self):
"""
Returns the translated title or the id if the id is empty
"""
title = self.getTranslatedTitle()
if title is not None:
title = str(title)
if title == '' or title is None:
return self.getId()
else:
return title
return self.getId()
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getTranslatedTitleOrId') 'getTranslatedTitleOrId')
def getTranslatedTitleOrId(self): def getTranslatedTitleOrId(self):
......
...@@ -726,18 +726,18 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn): ...@@ -726,18 +726,18 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn):
getObjectIds = CMFBTreeFolder.objectIds getObjectIds = CMFBTreeFolder.objectIds
# Overloading # Overloading
security.declareProtected( Permissions.AccessContentsInformation, 'getParentSqlExpression' ) security.declareProtected( Permissions.AccessContentsInformation, 'getParentSQLExpression' )
def getParentSqlExpression(self, table = 'catalog', strict_membership = 0): def getParentSQLExpression(self, table = 'catalog', strict_membership = 0):
""" """
Builds an SQL expression to search children and subclidren Builds an SQL expression to search children and subclidren
""" """
if strict_membership: if strict_membership:
return Base.getParentSqlExpression(self, table=table, strict_membership=strict_membership) return Base.getParentSQLExpression(self, table=table, strict_membership=strict_membership)
result = "%s.parent_uid = %s" % (table, self.getUid()) result = "%s.parent_uid = %s" % (table, self.getUid())
for o in self.objectValues(): for o in self.objectValues():
if hasattr(aq_base(o), 'objectValues'): if hasattr(aq_base(o), 'objectValues'):
# Do not consider non folder objects # Do not consider non folder objects
result = "%s OR %s" % (result, o.getParentSqlExpression(table=table, strict_membership=strict_membership)) result = "%s OR %s" % (result, o.getParentSQLExpression(table=table, strict_membership=strict_membership))
return "( %s )" % result return "( %s )" % result
......
...@@ -399,7 +399,7 @@ class ERP5TypeTestCase(PortalTestCase): ...@@ -399,7 +399,7 @@ class ERP5TypeTestCase(PortalTestCase):
def getSimulationTool(self): def getSimulationTool(self):
return getToolByName(self.getPortal(), 'portal_simulation', None) return getToolByName(self.getPortal(), 'portal_simulation', None)
def getSqlConnection(self): def getSQLConnection(self):
return getToolByName(self.getPortal(), 'erp5_sql_connection', None) return getToolByName(self.getPortal(), 'erp5_sql_connection', None)
def getPortalId(self): def getPortalId(self):
......
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