From 8ce69784373d294244846fe26f6f567aab804506 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Tue, 19 Aug 2014 09:04:18 +0200 Subject: [PATCH] [pep8] - remove unused level_class and general_ledger_xls/bal_formula - use false unused in a logger call --- .../report/general_ledger_xls.py | 3 --- .../report/trial_balance_xls.py | 11 +---------- .../report/nov_account_journal_xls.py | 3 +++ .../report/move_line_list_xls.py | 4 ++++ 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/account_financial_report_webkit_xls/report/general_ledger_xls.py b/account_financial_report_webkit_xls/report/general_ledger_xls.py index 54ebd22a..15212504 100644 --- a/account_financial_report_webkit_xls/report/general_ledger_xls.py +++ b/account_financial_report_webkit_xls/report/general_ledger_xls.py @@ -229,9 +229,6 @@ class general_ledger_xls(report_xls): 'init_balance') or 0.0 cumul_balance_curr = account.init_balance.get( 'init_balance_currency') or 0.0 - debit_cell = rowcol_to_cell(row_pos, 8) - credit_cell = rowcol_to_cell(row_pos, 9) - bal_formula = debit_cell + '-' + credit_cell c_specs = [('empty%s' % x, 1, 0, 'text', None) for x in range(6)] c_specs += [ diff --git a/account_financial_report_webkit_xls/report/trial_balance_xls.py b/account_financial_report_webkit_xls/report/trial_balance_xls.py index 8dc2dd63..ec479f4f 100644 --- a/account_financial_report_webkit_xls/report/trial_balance_xls.py +++ b/account_financial_report_webkit_xls/report/trial_balance_xls.py @@ -215,7 +215,6 @@ class trial_balance_xls(report_xls): ws.set_horz_split_pos(row_pos) last_child_consol_ids = [] - last_level = False # cell styles for account data view_cell_format = _xs['bold'] + _xs['fill'] + _xs['borders_all'] @@ -254,20 +253,12 @@ class trial_balance_xls(report_xls): comparisons = current_account.comparisons - if current_account.id in last_child_consol_ids: - # current account is a consolidation child of the last account: - # use the level of last account - level = last_level - level_class = 'account_level_consol' - else: + if current_account.id not in last_child_consol_ids: # current account is a not a consolidation child: use its own # level - level = current_account.level or 0 - level_class = "account_level_%s" % (level,) last_child_consol_ids = [ child_consol_id.id for child_consol_id in current_account.child_consol_ids] - last_level = current_account.level c_specs = [ ('code', 1, 0, 'text', current_account.code), diff --git a/account_journal_report_xls/report/nov_account_journal_xls.py b/account_journal_report_xls/report/nov_account_journal_xls.py index ce83ba53..77a49f60 100644 --- a/account_journal_report_xls/report/nov_account_journal_xls.py +++ b/account_journal_report_xls/report/nov_account_journal_xls.py @@ -276,6 +276,7 @@ class account_journal_xls(report_xls): debit_cell = rowcol_to_cell(row_pos, debit_pos) credit_cell = rowcol_to_cell(row_pos, credit_pos) bal_formula = debit_cell + '-' + credit_cell + _logger.log(logging.DEBUG, 'dummy call - %s' % bal_formula) c_specs = map( lambda x: self.render(x, self.col_specs_lines_template, 'lines'), wanted_list) @@ -289,9 +290,11 @@ class account_journal_xls(report_xls): debit_start = rowcol_to_cell(aml_start_pos, debit_pos) debit_stop = rowcol_to_cell(row_pos - 1, debit_pos) debit_formula = 'SUM(%s:%s)' % (debit_start, debit_stop) + _logger.log(logging.DEBUG, 'dummy call - %s' % debit_formula) credit_start = rowcol_to_cell(aml_start_pos, credit_pos) credit_stop = rowcol_to_cell(row_pos - 1, credit_pos) credit_formula = 'SUM(%s:%s)' % (credit_start, credit_stop) + _logger.log(logging.DEBUG, 'dummy call - %s' % credit_formula) debit_cell = rowcol_to_cell(row_pos, debit_pos) credit_cell = rowcol_to_cell(row_pos, credit_pos) bal_formula = debit_cell + '-' + credit_cell diff --git a/account_move_line_report_xls/report/move_line_list_xls.py b/account_move_line_report_xls/report/move_line_list_xls.py index 2393d877..3a39798d 100644 --- a/account_move_line_report_xls/report/move_line_list_xls.py +++ b/account_move_line_report_xls/report/move_line_list_xls.py @@ -339,6 +339,7 @@ class move_line_xls(report_xls): debit_cell = rowcol_to_cell(row_pos, debit_pos) credit_cell = rowcol_to_cell(row_pos, credit_pos) bal_formula = debit_cell + '-' + credit_cell + _logger.log(logging.DEBUG, 'dummy call - %s' % bal_formula) c_specs = map( lambda x: self.render(x, self.col_specs_template, 'lines'), wanted_list) @@ -351,12 +352,15 @@ class move_line_xls(report_xls): debit_start = rowcol_to_cell(row_pos - aml_cnt, debit_pos) debit_stop = rowcol_to_cell(row_pos - 1, debit_pos) debit_formula = 'SUM(%s:%s)' % (debit_start, debit_stop) + _logger.log(logging.DEBUG, 'dummy call - %s' % debit_formula) credit_start = rowcol_to_cell(row_pos - aml_cnt, credit_pos) credit_stop = rowcol_to_cell(row_pos - 1, credit_pos) credit_formula = 'SUM(%s:%s)' % (credit_start, credit_stop) + _logger.log(logging.DEBUG, 'dummy call - %s' % credit_formula) debit_cell = rowcol_to_cell(row_pos, debit_pos) credit_cell = rowcol_to_cell(row_pos, credit_pos) bal_formula = debit_cell + '-' + credit_cell + _logger.log(logging.DEBUG, 'dummy call - %s' % bal_formula) c_specs = map( lambda x: self.render(x, self.col_specs_template, 'totals'), wanted_list)