Reviewers: ,
Please review this at http://codereview.tryton.org/163007/ Affected files: M account.py M fiscalyear.py M move.py Index: account.py =================================================================== --- a/account.py +++ b/account.py @@ -2,8 +2,6 @@ #this repository contains the full copyright notices and license terms. from decimal import Decimal import datetime -import time -import os import operator from trytond.model import ModelView, ModelSQL, fields from trytond.wizard import Wizard @@ -617,7 +615,6 @@ return 'view' def get_currency(self, ids, name): - currency_obj = Pool().get('currency.currency') res = {} for account in self.browse(ids): res[account.id] = account.company.currency.id @@ -632,7 +629,6 @@ def get_balance(self, ids, name): res = {} pool = Pool() - company_obj = pool.get('company.company') currency_obj = pool.get('currency.currency') move_line_obj = pool.get('account.move.line') fiscalyear_obj = pool.get('account.fiscalyear') @@ -738,7 +734,6 @@ res = {} pool = Pool() move_line_obj = pool.get('account.move.line') - company_obj = pool.get('company.company') currency_obj = pool.get('currency.currency') fiscalyear_obj = pool.get('account.fiscalyear') deferral_obj = pool.get('account.account.deferral') @@ -1268,7 +1263,6 @@ return res def lines(self, account_ids, period_ids, posted): - move_line_obj = Pool().get('account.move.line') move_obj = Pool().get('account.move') res = dict((account_id, []) for account_id in account_ids) account_id2lines = self.get_lines(account_ids, period_ids, posted) Index: fiscalyear.py =================================================================== --- a/fiscalyear.py +++ b/fiscalyear.py @@ -1,7 +1,5 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. -import datetime -import time from dateutil.relativedelta import relativedelta from trytond.model import ModelView, ModelSQL, fields from trytond.wizard import Wizard @@ -113,7 +111,6 @@ return True def write(self, ids, vals): - move_obj = Pool().get('account.move') if vals.get('post_move_sequence'): for fiscalyear in self.browse(ids): if fiscalyear.post_move_sequence and \ Index: move.py =================================================================== --- a/move.py +++ b/move.py @@ -768,7 +768,6 @@ account_obj = pool.get('account.account') tax_code_obj = pool.get('account.tax.code') tax_obj = pool.get('account.tax') - move_obj = pool.get('account.move') if vals.get('move'): #Only for first line return res @@ -817,7 +816,6 @@ pool = Pool() party_obj = pool.get('party.party') journal_obj = pool.get('account.journal') - account_obj = pool.get('account.account') currency_obj = pool.get('currency.currency') cursor = Transaction().cursor res = {} -- [email protected] mailing list
