[FIX] General ledger wizard: if no fiscal year then intial balance set to 0

bzr revid: mra@mra-laptop-20100726114549-s426mzaulmobaq47
This commit is contained in:
Mustufa Rangwala 2010-07-26 17:15:49 +05:30
parent 648e991d73
commit 7ce63401a5
2 changed files with 2 additions and 1 deletions

View File

@ -32,7 +32,6 @@ import time
from report import report_sxw
from common_report_header import common_report_header
import rml_parse
import pooler
class general_ledger(rml_parse.rml_parse, common_report_header):
_name = 'report.account.general.ledger'

View File

@ -54,6 +54,8 @@ class account_report_general_ledger(osv.osv_memory):
if context is None:
context = {}
data['form'].update(self.read(cr, uid, ids, ['display_account', 'landscape', 'initial_balance', 'amount_currency', 'sortby'])[0])
if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record
data['form'].update({'initial_balance': False})
if data['form']['landscape']:
return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger_landscape', 'datas': data, 'nodestroy':True }
return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger', 'datas': data, 'nodestroy':True}