[FIX] WIKI: Wiki Pages Application Now got warning if Section is not Define- Create Index

lp bug: https://launchpad.net/bugs/736102 fixed

bzr revid: aag@tinyerp.co.in-20110322120529-we7lgl23t7fvrnw0
This commit is contained in:
aag (OpenERP)
2011-03-22 17:35:29 +05:30
parent f611508bfe
commit db2df372ee
+3
View File
@@ -20,6 +20,7 @@
##############################################################################
from osv import fields, osv
from tools.translate import _
class wiki_make_index(osv.osv_memory):
""" Create Index For Selected Page """
@@ -47,6 +48,8 @@ class wiki_make_index(osv.osv_memory):
cr.execute("Select id, section from wiki_wiki where id IN %s \
order by section ", (tuple(data),))
lst0 = cr.fetchall()
if not lst0[0][1]:
raise osv.except_osv(_('Warning !'), _('There is no section in this Page'))
lst = []
s_ids = {}