mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[PEP8] Fix pep8 errors for account_banking_sepa_direct_debit module
This commit is contained in:
@@ -73,7 +73,7 @@ class banking_export_sdd(orm.Model):
|
|||||||
('SHAR', 'Shared'),
|
('SHAR', 'Shared'),
|
||||||
('CRED', 'Borne by Creditor'),
|
('CRED', 'Borne by Creditor'),
|
||||||
('DEBT', 'Borne by Debtor'),
|
('DEBT', 'Borne by Debtor'),
|
||||||
], 'Charge Bearer', readonly=True,
|
], 'Charge Bearer', readonly=True,
|
||||||
help="Following service level : transaction charges are to be "
|
help="Following service level : transaction charges are to be "
|
||||||
"applied following the rules agreed in the service level and/or "
|
"applied following the rules agreed in the service level and/or "
|
||||||
"scheme (SEPA Core messages must use this). Shared : "
|
"scheme (SEPA Core messages must use this). Shared : "
|
||||||
@@ -90,7 +90,7 @@ class banking_export_sdd(orm.Model):
|
|||||||
'state': fields.selection([
|
'state': fields.selection([
|
||||||
('draft', 'Draft'),
|
('draft', 'Draft'),
|
||||||
('sent', 'Sent'),
|
('sent', 'Sent'),
|
||||||
], 'State', readonly=True),
|
], 'State', readonly=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
@@ -115,19 +115,19 @@ class sdd_mandate(orm.Model):
|
|||||||
'account_banking_sepa_direct_debit.recurrent_sequence_type_final':
|
'account_banking_sepa_direct_debit.recurrent_sequence_type_final':
|
||||||
lambda self, cr, uid, obj, ctx=None:
|
lambda self, cr, uid, obj, ctx=None:
|
||||||
obj['recurrent_sequence_type'] == 'final',
|
obj['recurrent_sequence_type'] == 'final',
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'type': fields.selection([
|
'type': fields.selection([
|
||||||
('recurrent', 'Recurrent'),
|
('recurrent', 'Recurrent'),
|
||||||
('oneoff', 'One-Off'),
|
('oneoff', 'One-Off'),
|
||||||
], 'Type of Mandate', required=True, track_visibility='always'),
|
], 'Type of Mandate', required=True, track_visibility='always'),
|
||||||
'recurrent_sequence_type': fields.selection([
|
'recurrent_sequence_type': fields.selection([
|
||||||
('first', 'First'),
|
('first', 'First'),
|
||||||
('recurring', 'Recurring'),
|
('recurring', 'Recurring'),
|
||||||
('final', 'Final'),
|
('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 "
|
help="This field is only used for Recurrent mandates, not for "
|
||||||
"One-Off mandates."),
|
"One-Off mandates."),
|
||||||
'sepa_migrated': fields.boolean(
|
'sepa_migrated': fields.boolean(
|
||||||
@@ -145,7 +145,7 @@ class sdd_mandate(orm.Model):
|
|||||||
help="When the field 'Migrated to SEPA' is not active, this "
|
help="When the field 'Migrated to SEPA' is not active, this "
|
||||||
"field will be used as the Original Mandate Identification in "
|
"field will be used as the Original Mandate Identification in "
|
||||||
"the Direct Debit file."),
|
"the Direct Debit file."),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'sepa_migrated': True,
|
'sepa_migrated': True,
|
||||||
@@ -181,7 +181,7 @@ class sdd_mandate(orm.Model):
|
|||||||
(_check_sdd_mandate, "Error msg in raise", [
|
(_check_sdd_mandate, "Error msg in raise", [
|
||||||
'type', 'recurrent_sequence_type', 'sepa_migrated',
|
'type', 'recurrent_sequence_type', 'sepa_migrated',
|
||||||
'original_mandate_identification',
|
'original_mandate_identification',
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
|
|
||||||
def create(self, cr, uid, vals, context=None):
|
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 "
|
"As you changed the bank account attached to this "
|
||||||
"mandate, the 'Sequence Type' has been set back to "
|
"mandate, the 'Sequence Type' has been set back to "
|
||||||
"'First'."),
|
"'First'."),
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _sdd_mandate_set_state_to_expired(self, cr, uid, context=None):
|
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),
|
('last_debit_date', '<=', expire_limit_date_str),
|
||||||
('state', '=', 'valid'),
|
('state', '=', 'valid'),
|
||||||
('signature_date', '<=', expire_limit_date_str),
|
('signature_date', '<=', expire_limit_date_str),
|
||||||
], context=context)
|
], context=context)
|
||||||
if expired_mandate_ids:
|
if expired_mandate_ids:
|
||||||
self.write(
|
self.write(
|
||||||
cr, uid, expired_mandate_ids, {'state': 'expired'},
|
cr, uid, expired_mandate_ids, {'state': 'expired'},
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class res_company(orm.Model):
|
|||||||
after_replacement = ''
|
after_replacement = ''
|
||||||
for char in before_replacement:
|
for char in before_replacement:
|
||||||
if char.isalpha():
|
if char.isalpha():
|
||||||
after_replacement += str(ord(char)-87)
|
after_replacement += str(ord(char) - 87)
|
||||||
else:
|
else:
|
||||||
after_replacement += char
|
after_replacement += char
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class banking_export_sdd_wizard(orm.TransientModel):
|
|||||||
'state': fields.selection([
|
'state': fields.selection([
|
||||||
('create', 'Create'),
|
('create', 'Create'),
|
||||||
('finish', 'Finish'),
|
('finish', 'Finish'),
|
||||||
], 'State', readonly=True),
|
], 'State', readonly=True),
|
||||||
'batch_booking': fields.boolean(
|
'batch_booking': fields.boolean(
|
||||||
'Batch Booking',
|
'Batch Booking',
|
||||||
help="If true, the bank statement will display only one credit "
|
help="If true, the bank statement will display only one credit "
|
||||||
@@ -48,7 +48,7 @@ class banking_export_sdd_wizard(orm.TransientModel):
|
|||||||
('SHAR', 'Shared'),
|
('SHAR', 'Shared'),
|
||||||
('CRED', 'Borne by Creditor'),
|
('CRED', 'Borne by Creditor'),
|
||||||
('DEBT', 'Borne by Debtor'),
|
('DEBT', 'Borne by Debtor'),
|
||||||
], 'Charge Bearer', required=True,
|
], 'Charge Bearer', required=True,
|
||||||
help="Following service level : transaction charges are to be "
|
help="Following service level : transaction charges are to be "
|
||||||
"applied following the rules agreed in the service level and/or "
|
"applied following the rules agreed in the service level and/or "
|
||||||
"scheme (SEPA Core messages must use this). Shared : transaction "
|
"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_ids': fields.many2many(
|
||||||
'payment.order', 'wiz_sdd_payorders_rel', 'wizard_id',
|
'payment.order', 'wiz_sdd_payorders_rel', 'wizard_id',
|
||||||
'payment_order_id', 'Payment Orders', readonly=True),
|
'payment_order_id', 'Payment Orders', readonly=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'charge_bearer': 'SLEV',
|
'charge_bearer': 'SLEV',
|
||||||
'state': 'create',
|
'state': 'create',
|
||||||
}
|
}
|
||||||
|
|
||||||
def create(self, cr, uid, vals, context=None):
|
def create(self, cr, uid, vals, context=None):
|
||||||
payment_order_ids = context.get('active_ids', [])
|
payment_order_ids = context.get('active_ids', [])
|
||||||
@@ -158,7 +158,7 @@ class banking_export_sdd_wizard(orm.TransientModel):
|
|||||||
pain_ns = {
|
pain_ns = {
|
||||||
'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
|
'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
|
||||||
None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor,
|
None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor,
|
||||||
}
|
}
|
||||||
|
|
||||||
xml_root = etree.Element('Document', nsmap=pain_ns)
|
xml_root = etree.Element('Document', nsmap=pain_ns)
|
||||||
pain_root = etree.SubElement(xml_root, root_xml_tag)
|
pain_root = etree.SubElement(xml_root, root_xml_tag)
|
||||||
@@ -220,7 +220,7 @@ class banking_export_sdd_wizard(orm.TransientModel):
|
|||||||
'recurring': 'RCUR',
|
'recurring': 'RCUR',
|
||||||
'first': 'FRST',
|
'first': 'FRST',
|
||||||
'final': 'FNAL',
|
'final': 'FNAL',
|
||||||
}
|
}
|
||||||
seq_type_label = \
|
seq_type_label = \
|
||||||
line.mandate_id.recurrent_sequence_type
|
line.mandate_id.recurrent_sequence_type
|
||||||
assert seq_type_label is not False
|
assert seq_type_label is not False
|
||||||
|
|||||||
Reference in New Issue
Block a user