Browse Source

[FIX] Fixed bug that avoided to generate


			
			
				6.0
			
			
		
Humberto Arocha 13 years ago
parent
commit
6f18c9e8d9
  1. 23
      account_financial_report/report/account_balance.py
  2. 23
      account_financial_report/report/account_balance_2_cols.py
  3. 22
      account_financial_report/report/account_balance_4_cols.py

23
account_financial_report/report/account_balance.py

@ -141,7 +141,7 @@ class account_balance(report_sxw.rml_parse):
return rc_obj.browse(self.cr, self.uid, company_id).currency_id.id
def lines(self, form, ids={}, done=None, level=0):
def lines(self, form, level=0):
"""
Returns all the data needed for the report lines
(account info plus debit/credit/balance in the selected period
@ -155,12 +155,7 @@ class account_balance(report_sxw.rml_parse):
self.to_currency_id = form['currency_id'] and form['currency_id'][0]
tot_eje = 0.0
if not ids:
ids = self.ids
if not ids:
return []
if not done:
done = {}
if form.has_key('account_list') and form['account_list']:
account_ids = form['account_list']
del form['account_list']
@ -172,11 +167,12 @@ class account_balance(report_sxw.rml_parse):
fiscalyear_obj = self.pool.get('account.fiscalyear')
# Get the fiscal year
fiscalyear = None
if form.get('fiscalyear'):
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, form['fiscalyear'])
else:
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear_obj.find(self.cr, self.uid))
if type(form.get('fiscalyear')) in (list,tuple):
fiscalyear = form['fiscalyear'] and form['fiscalyear'][0]
elif type(form.get('fiscalyear')) in (int,):
fiscalyear = form['fiscalyear']
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear)
#
# Get the accounts
@ -267,11 +263,6 @@ class account_balance(report_sxw.rml_parse):
for account in accounts:
account_id = account['id']
if account_id in done:
pass
done[account_id] = 1
#
# Calculate the account level
#

23
account_financial_report/report/account_balance_2_cols.py

@ -144,7 +144,7 @@ class account_balance(report_sxw.rml_parse):
def lines(self, form, ids={}, done=None, level=0):
def lines(self, form, level=0):
"""
Returns all the data needed for the report lines
(account info plus debit/credit/balance in the selected period
@ -162,12 +162,6 @@ class account_balance(report_sxw.rml_parse):
tot_deb = 0.0
tot_crd = 0.0
tot_eje = 0.0
if not ids:
ids = self.ids
if not ids:
return []
if not done:
done = {}
if form.has_key('account_list') and form['account_list']:
account_ids = form['account_list']
@ -179,12 +173,12 @@ class account_balance(report_sxw.rml_parse):
period_obj = self.pool.get('account.period')
fiscalyear_obj = self.pool.get('account.fiscalyear')
fiscalyear = None
if form.get('fiscalyear'):
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, form['fiscalyear'])
else:
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear_obj.find(self.cr, self.uid))
if type(form.get('fiscalyear')) in (list,tuple):
fiscalyear = form['fiscalyear'] and form['fiscalyear'][0]
elif type(form.get('fiscalyear')) in (int,):
fiscalyear = form['fiscalyear']
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear)
#
# Get the accounts
#
@ -290,11 +284,6 @@ class account_balance(report_sxw.rml_parse):
for account in accounts:
account_id = account['id']
if account_id in done:
pass
done[account_id] = 1
accounts_levels[account_id] = account['level']
#

22
account_financial_report/report/account_balance_4_cols.py

@ -149,7 +149,7 @@ class account_balance(report_sxw.rml_parse):
rc_obj = self.pool.get('res.company')
return rc_obj.browse(self.cr, self.uid, company_id).currency_id.id
def lines(self, form, ids={}, done=None, level=0):
def lines(self, form, level=0):
"""
Returns all the data needed for the report lines
(account info plus debit/credit/balance in the selected period
@ -165,12 +165,6 @@ class account_balance(report_sxw.rml_parse):
tot_deb = 0.0
tot_crd = 0.0
tot_eje = 0.0
if not ids:
ids = self.ids
if not ids:
return []
if not done:
done = {}
if form.has_key('account_list') and form['account_list']:
account_ids = form['account_list']
@ -182,11 +176,12 @@ class account_balance(report_sxw.rml_parse):
period_obj = self.pool.get('account.period')
fiscalyear_obj = self.pool.get('account.fiscalyear')
fiscalyear = None
if form.get('fiscalyear'):
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, form['fiscalyear'])
else:
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear_obj.find(self.cr, self.uid))
if type(form.get('fiscalyear')) in (list,tuple):
fiscalyear = form['fiscalyear'] and form['fiscalyear'][0]
elif type(form.get('fiscalyear')) in (int,):
fiscalyear = form['fiscalyear']
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear)
#
# Get the accounts
@ -305,11 +300,6 @@ class account_balance(report_sxw.rml_parse):
for account in accounts:
account_id = account['id']
if account_id in done:
pass
done[account_id] = 1
accounts_levels[account_id] = account['level']
#

Loading…
Cancel
Save