Browse Source

[FIX] Wrong type: BF, right is BS

pull/7/merge
Humberto Arocha 12 years ago
parent
commit
8fb2a5591d
  1. 10
      account_financial_report/report/parser.py

10
account_financial_report/report/parser.py

@ -459,7 +459,7 @@ class account_balance(report_sxw.rml_parse):
account_black = account_obj.browse( account_black = account_obj.browse(
self.cr, self.uid, account_black_ids, ctx_to_use) self.cr, self.uid, account_black_ids, ctx_to_use)
if form['inf_type'] == 'BF':
if form['inf_type'] == 'BS':
account_black_init = account_obj.browse( account_black_init = account_obj.browse(
self.cr, self.uid, account_black_ids, ctx_i) self.cr, self.uid, account_black_ids, ctx_i)
@ -479,11 +479,11 @@ class account_balance(report_sxw.rml_parse):
black_data['debit'] = i.debit black_data['debit'] = i.debit
black_data['credit'] = i.credit black_data['credit'] = i.credit
black_data['balance'] = i.balance black_data['balance'] = i.balance
if form['inf_type'] == 'BF':
if form['inf_type'] == 'BS':
black_data['balanceinit'] = 0.0 black_data['balanceinit'] = 0.0
dict_black[i.id] = black_data dict_black[i.id] = black_data
if form['inf_type'] == 'BF':
if form['inf_type'] == 'BS':
for i in account_black_init: for i in account_black_init:
dict_black[i.id]['balanceinit'] = i.balance dict_black[i.id]['balanceinit'] = i.balance
######################### #########################
@ -496,7 +496,7 @@ class account_balance(report_sxw.rml_parse):
not_black_data['debit'] = 0.0 not_black_data['debit'] = 0.0
not_black_data['credit'] = 0.0 not_black_data['credit'] = 0.0
not_black_data['balance'] = 0.0 not_black_data['balance'] = 0.0
if form['inf_type'] == 'BF':
if form['inf_type'] == 'BS':
not_black_data['balanceinit'] = 0.0 not_black_data['balanceinit'] = 0.0
dict_not_black[i.id] = not_black_data dict_not_black[i.id] = not_black_data
########################### ###########################
@ -518,7 +518,7 @@ class account_balance(report_sxw.rml_parse):
child_id.id].get('credit') child_id.id].get('credit')
dict_not_black[acc_id]['balance'] += all_account[ dict_not_black[acc_id]['balance'] += all_account[
child_id.id].get('balance') child_id.id].get('balance')
if form['inf_type'] == 'BF':
if form['inf_type'] == 'BS':
dict_not_black[acc_id]['balanceinit'] += all_account[ dict_not_black[acc_id]['balanceinit'] += all_account[
child_id.id].get('balanceinit') child_id.id].get('balanceinit')
all_account[acc_id] = dict_not_black[acc_id] all_account[acc_id] = dict_not_black[acc_id]

Loading…
Cancel
Save