[FIX] se arreglo el error al momento de filtrar por fecha y periodo, si el periodo no se encotraba dentro de la fecha

estipulada arrojaba un error con una advertencia por que no se incluia la libreria translate
6.0
Miguel Delgado 2012-05-25 10:43:27 -05:30
parent fc28bafbdd
commit 23a1651909
3 changed files with 6 additions and 3 deletions

View File

@ -29,6 +29,7 @@
from osv import osv,fields
import pooler
import time
from tools.translate import _
class wizard_account_balance_gene_2(osv.osv_memory):
_name = "wizard.report.account.balance.gene.2"
@ -141,7 +142,7 @@ class wizard_account_balance_gene_2(osv.osv_memory):
minmax = cr.dictfetchall()
if minmax:
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
raise osv.except_osv(_('Error !'),('La intersepcion entre el periodo y fecha es vacio'))
raise osv.except_osv(_('Error !'),_('La intersepcion entre el periodo y fecha es vacio'))
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.gene.2', 'datas': data}

View File

@ -29,6 +29,7 @@
from osv import osv,fields
import pooler
import time
from tools.translate import _
class wizard_report(osv.osv_memory):
_name = "wizard.report"
@ -141,7 +142,7 @@ class wizard_report(osv.osv_memory):
minmax = cr.dictfetchall()
if minmax:
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
raise osv.except_osv(_('Error !'),('La intersepcion entre el periodo y fecha es vacio'))
raise osv.except_osv(_('Error !'),_('La intersepcion entre el periodo y fecha es vacio'))
return {'type': 'ir.actions.report.xml', 'report_name': 'wizard.report.reporte', 'datas': data}

View File

@ -29,6 +29,7 @@
from osv import osv,fields
import pooler
import time
from tools.translate import _
class wizard_account_balance_gene(osv.osv_memory):
_name = "wizard.report.account.balance.gene"
@ -141,7 +142,7 @@ class wizard_account_balance_gene(osv.osv_memory):
minmax = cr.dictfetchall()
if minmax:
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
raise osv.except_osv(_('Error !'),('La intersepcion entre el periodo y fecha es vacio'))
raise osv.except_osv(_('Error !'),_('La intersepcion entre el periodo y fecha es vacio'))
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.gene', 'datas': data}