small changes in general ledger wizard

bzr revid: patelamit2003@gmail.com-20081024105257-qizl26lorinc0g90
This commit is contained in:
apa-tiny 2008-10-24 16:22:57 +05:30
parent b541df5ba9
commit ee97eb5488
2 changed files with 7 additions and 4 deletions

View File

@ -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):

View File

@ -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']