[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 translate6.0
parent
fc28bafbdd
commit
23a1651909
|
@ -29,6 +29,7 @@
|
||||||
from osv import osv,fields
|
from osv import osv,fields
|
||||||
import pooler
|
import pooler
|
||||||
import time
|
import time
|
||||||
|
from tools.translate import _
|
||||||
|
|
||||||
class wizard_account_balance_gene_2(osv.osv_memory):
|
class wizard_account_balance_gene_2(osv.osv_memory):
|
||||||
_name = "wizard.report.account.balance.gene.2"
|
_name = "wizard.report.account.balance.gene.2"
|
||||||
|
@ -141,7 +142,7 @@ class wizard_account_balance_gene_2(osv.osv_memory):
|
||||||
minmax = cr.dictfetchall()
|
minmax = cr.dictfetchall()
|
||||||
if minmax:
|
if minmax:
|
||||||
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
|
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}
|
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.gene.2', 'datas': data}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
from osv import osv,fields
|
from osv import osv,fields
|
||||||
import pooler
|
import pooler
|
||||||
import time
|
import time
|
||||||
|
from tools.translate import _
|
||||||
|
|
||||||
class wizard_report(osv.osv_memory):
|
class wizard_report(osv.osv_memory):
|
||||||
_name = "wizard.report"
|
_name = "wizard.report"
|
||||||
|
@ -141,7 +142,7 @@ class wizard_report(osv.osv_memory):
|
||||||
minmax = cr.dictfetchall()
|
minmax = cr.dictfetchall()
|
||||||
if minmax:
|
if minmax:
|
||||||
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
|
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}
|
return {'type': 'ir.actions.report.xml', 'report_name': 'wizard.report.reporte', 'datas': data}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
from osv import osv,fields
|
from osv import osv,fields
|
||||||
import pooler
|
import pooler
|
||||||
import time
|
import time
|
||||||
|
from tools.translate import _
|
||||||
|
|
||||||
class wizard_account_balance_gene(osv.osv_memory):
|
class wizard_account_balance_gene(osv.osv_memory):
|
||||||
_name = "wizard.report.account.balance.gene"
|
_name = "wizard.report.account.balance.gene"
|
||||||
|
@ -141,7 +142,7 @@ class wizard_account_balance_gene(osv.osv_memory):
|
||||||
minmax = cr.dictfetchall()
|
minmax = cr.dictfetchall()
|
||||||
if minmax:
|
if minmax:
|
||||||
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
|
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}
|
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.gene', 'datas': data}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue