From ee97eb5488ef5f1f1b45e13fdd1877e5ef9b8740 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Fri, 24 Oct 2008 16:22:57 +0530 Subject: [PATCH] small changes in general ledger wizard bzr revid: patelamit2003@gmail.com-20081024105257-qizl26lorinc0g90 --- addons/account/report/general_ledger_landscape.py | 3 ++- addons/account/wizard/wizard_general_ledger_report.py | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/account/report/general_ledger_landscape.py b/addons/account/report/general_ledger_landscape.py index 86108b15b7b..8fb70864e00 100755 --- a/addons/account/report/general_ledger_landscape.py +++ b/addons/account/report/general_ledger_landscape.py @@ -162,6 +162,7 @@ class general_ledger_landscape(rml_parse.rml_parse): else : borne_max = date_max elif form['state'] == 'none': + sql = """ SELECT min(date) as start_date,max(date) as stop_date FROM account_move_line """ self.cr.execute(sql) @@ -249,7 +250,7 @@ class general_ledger_landscape(rml_parse.rml_parse): move.init_credit = 0 move.init_debit = 0 - print"res",res + return res def lines(self, account, form): diff --git a/addons/account/wizard/wizard_general_ledger_report.py b/addons/account/wizard/wizard_general_ledger_report.py index dab3842c44e..2ba3b2b0a1f 100644 --- a/addons/account/wizard/wizard_general_ledger_report.py +++ b/addons/account/wizard/wizard_general_ledger_report.py @@ -131,6 +131,7 @@ def _check(self, cr, uid, data, context): return 'report' def _check_date(self, cr, uid, data, context): + sql = """ SELECT f.id, f.date_start, f.date_stop FROM account_fiscalyear f Where '%s' between f.date_start and f.date_stop """%(data['form']['date_from']) cr.execute(sql) @@ -147,10 +148,11 @@ def _check_date(self, cr, uid, data, context): def _check_state(self, cr, uid, data, context): if data['form']['state'] == 'bydate': - data['form']['fiscalyear'] = False + _check_date(self, cr, uid, data, context) + data['form']['fiscalyear'] = 0 else : - self._check_date(cr, uid, data, context) - data['form']['fiscalyear'] = True + + data['form']['fiscalyear'] = 1 return data['form']