[FIX] Base_report_creator : Wizard is available only for custom query,not for the custom result

bzr revid: jvo@tinyerp.com-20091223112236-5tp5x0n2jor4t42e
This commit is contained in:
Jay (Open ERP) 2009-12-23 16:52:36 +05:30
parent 0cd84c4e31
commit 7ce73f7713
1 changed files with 3 additions and 1 deletions

View File

@ -26,13 +26,15 @@ import netsvc
import time
import pooler
from osv import osv
from tools.translate import _
class report_creator_open(wizard.interface):
def _open_report(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
if context.get('report_id',False):
raise wizard.except_wizard(_('UserError'),_('No Wizards available for this object!'))
rep = pool.get('base_report_creator.report').browse(cr, uid, data['id'], context)
view_mode = rep.view_type1
if rep.view_type2: