Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandomr committed Jan 5, 2016
1 parent 78532de commit db6bcc5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from decimal import Decimal



class Bradesco240(Cnab240):

def __init__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from ..cnab import Cnab
from cnab240.tipos import Arquivo
from decimal import Decimal, ROUND_DOWN
from decimal import Decimal
from openerp.addons.l10n_br_base.tools.misc import punctuation_rm
import datetime
import re
Expand Down Expand Up @@ -84,8 +84,7 @@ def _prepare_header(self):
self.order.mode.bank_id.bra_number),
'cedente_conta': int(self.order.mode.bank_id.acc_number),
'cedente_conta_dv': (self.order.mode.bank_id.acc_number_dig),
'cedente_agencia_dv':
self.order.mode.bank_id.bra_number_dig,
'cedente_agencia_dv': self.order.mode.bank_id.bra_number_dig,
'cedente_nome': self.order.company_id.legal_name,
# DV ag e conta
'cedente_dv_ag_cc': (self.order.mode.bank_id.bra_acc_dig),
Expand Down Expand Up @@ -154,8 +153,7 @@ def _prepare_segmento(self, line):
'cedente_agencia': int(self.order.mode.bank_id.bra_number),
'cedente_conta': int(self.order.mode.bank_id.acc_number),
'cedente_conta_dv': self.order.mode.bank_id.acc_number_dig,
'cedente_agencia_dv':
self.order.mode.bank_id.bra_number_dig,
'cedente_agencia_dv': self.order.mode.bank_id.bra_number_dig,
# DV ag e cc
'cedente_dv_ag_cc': (self.order.mode.bank_id.bra_acc_dig),
'identificacao_titulo': u'0000000', # TODO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from ..cnab import Cnab
from cnab240.tipos import Arquivo
from decimal import Decimal, ROUND_DOWN
from decimal import Decimal
from openerp.addons.l10n_br_base.tools.misc import punctuation_rm
import datetime
import re
Expand Down
12 changes: 6 additions & 6 deletions l10n_br_account_banking_payment_cnab/model/payment_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class PaymentMode(models.Model):

payment_order_type = fields.Selection(
selection_add=[
('cobranca', u'Cobrança'),
])
('cobranca', u'Cobrança'),
])

# A exportação CNAB não se encaixa somente nos parâmetros de
# débito e crédito.
Expand All @@ -41,14 +41,14 @@ class PaymentModeType(models.Model):

payment_order_type = fields.Selection(
selection_add=[
('cobranca', u'Cobrança'),
])
('cobranca', u'Cobrança'),
])


class PaymentOrder(models.Model):
_inherit = 'payment.order'

payment_order_type = fields.Selection(
selection_add=[
('cobranca', u'Cobrança'),
])
('cobranca', u'Cobrança'),
])
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def extend_payment_order_domain(self, payment_order, domain):
if payment_order.mode.type.code == '240':
if payment_order.mode.payment_order_type == 'cobranca':
domain += [
('debit', '>', 0)
('debit', '>', 0)
]
# TODO: Refactory this
index = domain.index(('invoice.payment_mode_id', '=', False))
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_cnab_import/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
Allows to import CNAB (Centro Nacional de Automação Bancária) statement
files.
It requires python pyCNAB library to work.
It requires python PyCNAB library to work.
""",
}
2 changes: 1 addition & 1 deletion l10n_br_cnab_import/account_bank_statement_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AccountBankStatementImport(models.TransientModel):

import_modes = fields.Selection(
MODOS_IMPORTACAO_CNAB,
string = u'Opções de importação', select=True, required=True)
string=u'Opções de importação', select=True, required=True)

@api.model
def _check_cnab(self, data_file):
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_cnab_import/file_cnab240_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def parse(self, data, banco_impt):
# nosso numero
'commission_amount': evento.valor_tarifas,

'currency_code': u'BRL', # Código da moeda
'currency_code': u'BRL', # Código da moeda
'account_number': evento.cedente_agencia,
'transactions': transacoes,
})
Expand Down

0 comments on commit db6bcc5

Please sign in to comment.