Fix Pylint warnings

This commit is contained in:
moylop260
2014-11-13 18:13:05 -06:00
committed by Matthieu Dietrich
parent b8bafa68ae
commit 2540f699b4
20 changed files with 41 additions and 42 deletions

View File

@@ -20,6 +20,6 @@
# #
############################################################################## ##############################################################################
import easy_reconcile from . import easy_reconcile
import base_advanced_reconciliation from . import base_advanced_reconciliation
import advanced_reconciliation from . import advanced_reconciliation

View File

@@ -19,8 +19,8 @@
# #
############################################################################## ##############################################################################
import easy_reconcile from . import easy_reconcile
import base_reconciliation from . import base_reconciliation
import simple_reconciliation from . import simple_reconciliation
import easy_reconcile_history from . import easy_reconcile_history
import res_config from . import res_config

View File

@@ -329,7 +329,7 @@ class AccountStatementCompletionRule(orm.Model):
# to: # to:
# http://www.postgresql.org/docs/9.0/static/functions-matching.html # http://www.postgresql.org/docs/9.0/static/functions-matching.html
# in chapter 9.7.3.6. Limits and Compatibility # in chapter 9.7.3.6. Limits and Compatibility
sql = """ sql = r"""
SELECT id FROM ( SELECT id FROM (
SELECT id, SELECT id,
regexp_matches(%s, regexp_matches(%s,

View File

@@ -18,6 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import parser from . import parser
import wizard from . import wizard
import statement from . import statement

View File

@@ -19,7 +19,7 @@
# #
############################################################################## ##############################################################################
from parser import new_bank_statement_parser from .parser import new_bank_statement_parser
from parser import BankStatementImportParser from .parser import BankStatementImportParser
import file_parser from . import file_parser
import generic_file_parser from . import generic_file_parser

View File

@@ -21,8 +21,8 @@ from openerp.tools.translate import _
from openerp.osv.orm import except_orm from openerp.osv.orm import except_orm
import tempfile import tempfile
import datetime import datetime
from parser import BankStatementImportParser from .parser import BankStatementImportParser
from parser import UnicodeDictReader from .parser import UnicodeDictReader
try: try:
import xlrd import xlrd
except: except:

View File

@@ -19,7 +19,7 @@
############################################################################## ##############################################################################
import datetime import datetime
from file_parser import FileParser from .file_parser import FileParser
from openerp.addons.account_statement_base_import.parser.file_parser import ( from openerp.addons.account_statement_base_import.parser.file_parser import (
float_or_zero float_or_zero
) )

View File

@@ -23,7 +23,7 @@ import traceback
from openerp.tools.translate import _ from openerp.tools.translate import _
import datetime import datetime
from openerp.osv import fields, orm from openerp.osv import fields, orm
from parser import new_bank_statement_parser from .parser import new_bank_statement_parser
from openerp.tools.config import config from openerp.tools.config import config
@@ -74,7 +74,6 @@ class AccountStatementProfil(orm.Model):
statement ID statement ID
:param: context: global context :param: context: global context
""" """
pass
def write_logs_after_import(self, cr, uid, ids, statement_id, num_lines, def write_logs_after_import(self, cr, uid, ids, statement_id, num_lines,
context): context):

View File

@@ -17,4 +17,4 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import import_statement from . import import_statement

View File

@@ -20,6 +20,6 @@
############################################################################### ###############################################################################
"""Account Statement Cancel Line.""" """Account Statement Cancel Line."""
import statement # noqa from . import statement # noqa
import statement_line # noqa from . import statement_line # noqa
import wizard # noqa from . import wizard # noqa

View File

@@ -20,5 +20,5 @@
############################################################################### ###############################################################################
"""Wizard for asking the confirmation when some move is reconciled.""" """Wizard for asking the confirmation when some move is reconciled."""
import cancel_statement # noqa from . import cancel_statement # noqa
import cancel_statement_line # noqa from . import cancel_statement_line # noqa

View File

@@ -19,4 +19,4 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import commission from . import commission

View File

@@ -19,7 +19,7 @@
# #
############################################################################## ##############################################################################
import statement from . import statement
import report from . import report
import account from . import account
import voucher from . import voucher

View File

@@ -23,4 +23,4 @@
# #
############################################################################## ##############################################################################
import bank_statement_report from . import bank_statement_report

View File

@@ -447,7 +447,7 @@ class AccountBankStatement(orm.Model):
def get_account_for_counterpart(self, cr, uid, amount, account_receivable, def get_account_for_counterpart(self, cr, uid, amount, account_receivable,
account_payable): account_payable):
"""For backward compatibility.""" """For backward compatibility."""
account_id, type = self.get_account_and_type_for_counterpart( account_id, account_type = self.get_account_and_type_for_counterpart(
cr, uid, amount, account_receivable, account_payable) cr, uid, amount, account_receivable, account_payable)
return account_id return account_id

View File

@@ -18,5 +18,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import statement from . import statement
import parser from . import parser

View File

@@ -54,7 +54,7 @@ class AccountStatementCompletionRule(Model):
string="Account to set"), string="Account to set"),
} }
def set_account(self, cr, uid, id, st_line, context=None): def set_account(self, cr, uid, account_id, st_line, context=None):
""" """
If line name match regex, update account_id If line name match regex, update account_id
Then, call the generic st_line method to complete other values. Then, call the generic st_line method to complete other values.
@@ -69,7 +69,7 @@ class AccountStatementCompletionRule(Model):
name = st_line['name'] name = st_line['name']
res = {} res = {}
if name: if name:
rule = self.browse(cr, uid, id, context=context) rule = self.browse(cr, uid, account_id, context=context)
if re.match(rule.regex, name): if re.match(rule.regex, name):
res['account_id'] = rule.account_id.id res['account_id'] = rule.account_id.id
return res return res

View File

@@ -19,4 +19,4 @@
# #
############################################################################## ##############################################################################
import statement from . import statement

View File

@@ -18,5 +18,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
import parser from . import parser
import statement from . import statement

View File

@@ -19,4 +19,4 @@
# #
############################################################################## ##############################################################################
import transactionid_file_parser from . import transactionid_file_parser