From 5ea0d3dc5a0c8782b5b261a69fc3ee7dd109e1fe Mon Sep 17 00:00:00 2001 From: Humberto Arocha Date: Mon, 30 Jul 2012 19:26:47 -0530 Subject: [PATCH] [IMP] Cambiando orden de llamada de funcion missin_period() --- account_financial_report/report/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_financial_report/report/parser.py b/account_financial_report/report/parser.py index 525e9d22..2a5c608d 100644 --- a/account_financial_report/report/parser.py +++ b/account_financial_report/report/parser.py @@ -228,10 +228,10 @@ class account_balance(report_sxw.rml_parse): if form['filter'] in ['byperiod', 'all']: ctx_init['periods'] = form['periods'] - date_start = min([period.date_start for period in period_obj.browse(self.cr, self.uid, ctx_init['periods'])]) - ctx_init['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_stop','<=',date_start)]) if not ctx_init['periods']: ctx_init = missing_period(ctx_init.copy()) + date_start = min([period.date_start for period in period_obj.browse(self.cr, self.uid, ctx_init['periods'])]) + ctx_init['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_stop','<=',date_start)]) elif form['filter'] in ['bydate']: ctx_init['date_from'] = fiscalyear.date_start ctx_init['date_to'] = form['date_from']