[PEP8] Fix pep8 errors for account_banking_sepa_direct_debit module

This commit is contained in:
EL HADJI DEM
2014-10-08 12:09:05 -04:00
parent 4a86115247
commit 48e9de2bc1
3 changed files with 16 additions and 16 deletions

View File

@@ -73,7 +73,7 @@ class banking_export_sdd(orm.Model):
('SHAR', 'Shared'),
('CRED', 'Borne by Creditor'),
('DEBT', 'Borne by Debtor'),
], 'Charge Bearer', readonly=True,
], 'Charge Bearer', readonly=True,
help="Following service level : transaction charges are to be "
"applied following the rules agreed in the service level and/or "
"scheme (SEPA Core messages must use this). Shared : "
@@ -90,7 +90,7 @@ class banking_export_sdd(orm.Model):
'state': fields.selection([
('draft', 'Draft'),
('sent', 'Sent'),
], 'State', readonly=True),
], 'State', readonly=True),
}
_defaults = {
@@ -115,19 +115,19 @@ class sdd_mandate(orm.Model):
'account_banking_sepa_direct_debit.recurrent_sequence_type_final':
lambda self, cr, uid, obj, ctx=None:
obj['recurrent_sequence_type'] == 'final',
}
}
}
_columns = {
'type': fields.selection([
('recurrent', 'Recurrent'),
('oneoff', 'One-Off'),
], 'Type of Mandate', required=True, track_visibility='always'),
], 'Type of Mandate', required=True, track_visibility='always'),
'recurrent_sequence_type': fields.selection([
('first', 'First'),
('recurring', 'Recurring'),
('final', 'Final'),
], 'Sequence Type for Next Debit', track_visibility='onchange',
], 'Sequence Type for Next Debit', track_visibility='onchange',
help="This field is only used for Recurrent mandates, not for "
"One-Off mandates."),
'sepa_migrated': fields.boolean(
@@ -145,7 +145,7 @@ class sdd_mandate(orm.Model):
help="When the field 'Migrated to SEPA' is not active, this "
"field will be used as the Original Mandate Identification in "
"the Direct Debit file."),
}
}
_defaults = {
'sepa_migrated': True,
@@ -181,7 +181,7 @@ class sdd_mandate(orm.Model):
(_check_sdd_mandate, "Error msg in raise", [
'type', 'recurrent_sequence_type', 'sepa_migrated',
'original_mandate_identification',
]),
]),
]
def create(self, cr, uid, vals, context=None):
@@ -214,7 +214,7 @@ class sdd_mandate(orm.Model):
"As you changed the bank account attached to this "
"mandate, the 'Sequence Type' has been set back to "
"'First'."),
}
}
return res
def _sdd_mandate_set_state_to_expired(self, cr, uid, context=None):
@@ -228,7 +228,7 @@ class sdd_mandate(orm.Model):
('last_debit_date', '<=', expire_limit_date_str),
('state', '=', 'valid'),
('signature_date', '<=', expire_limit_date_str),
], context=context)
], context=context)
if expired_mandate_ids:
self.write(
cr, uid, expired_mandate_ids, {'state': 'expired'},

View File

@@ -65,7 +65,7 @@ class res_company(orm.Model):
after_replacement = ''
for char in before_replacement:
if char.isalpha():
after_replacement += str(ord(char)-87)
after_replacement += str(ord(char) - 87)
else:
after_replacement += char
logger.debug(

View File

@@ -36,7 +36,7 @@ class banking_export_sdd_wizard(orm.TransientModel):
'state': fields.selection([
('create', 'Create'),
('finish', 'Finish'),
], 'State', readonly=True),
], 'State', readonly=True),
'batch_booking': fields.boolean(
'Batch Booking',
help="If true, the bank statement will display only one credit "
@@ -48,7 +48,7 @@ class banking_export_sdd_wizard(orm.TransientModel):
('SHAR', 'Shared'),
('CRED', 'Borne by Creditor'),
('DEBT', 'Borne by Debtor'),
], 'Charge Bearer', required=True,
], 'Charge Bearer', required=True,
help="Following service level : transaction charges are to be "
"applied following the rules agreed in the service level and/or "
"scheme (SEPA Core messages must use this). Shared : transaction "
@@ -73,12 +73,12 @@ class banking_export_sdd_wizard(orm.TransientModel):
'payment_order_ids': fields.many2many(
'payment.order', 'wiz_sdd_payorders_rel', 'wizard_id',
'payment_order_id', 'Payment Orders', readonly=True),
}
}
_defaults = {
'charge_bearer': 'SLEV',
'state': 'create',
}
}
def create(self, cr, uid, vals, context=None):
payment_order_ids = context.get('active_ids', [])
@@ -158,7 +158,7 @@ class banking_export_sdd_wizard(orm.TransientModel):
pain_ns = {
'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor,
}
}
xml_root = etree.Element('Document', nsmap=pain_ns)
pain_root = etree.SubElement(xml_root, root_xml_tag)
@@ -220,7 +220,7 @@ class banking_export_sdd_wizard(orm.TransientModel):
'recurring': 'RCUR',
'first': 'FRST',
'final': 'FNAL',
}
}
seq_type_label = \
line.mandate_id.recurrent_sequence_type
assert seq_type_label is not False