mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[PEP8] Fix pep8 errors
This commit is contained in:
@@ -46,8 +46,8 @@ class mandate(orm.Model):
|
||||
'account_banking_mandate.mandate_cancel':
|
||||
lambda self, cr, uid, obj, ctx=None:
|
||||
obj['state'] == 'cancel',
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
def _get_states(self, cr, uid, context=None):
|
||||
return (
|
||||
@@ -78,7 +78,7 @@ class mandate(orm.Model):
|
||||
"the customer."),
|
||||
'payment_line_ids': fields.one2many(
|
||||
'payment.line', 'mandate_id', "Related Payment Lines"),
|
||||
}
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda self, cr, uid, context:
|
||||
@@ -92,7 +92,7 @@ class mandate(orm.Model):
|
||||
'mandate_ref_company_uniq',
|
||||
'unique(unique_mandate_reference, company_id)',
|
||||
'A Mandate with the same reference already exists for this company !'
|
||||
)]
|
||||
)]
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
if vals.get('unique_mandate_reference', '/') == '/':
|
||||
|
||||
@@ -32,4 +32,4 @@ class account_invoice(orm.Model):
|
||||
'account.banking.mandate', 'Direct Debit Mandate',
|
||||
domain=[('state', '=', 'valid')], readonly=True,
|
||||
states={'draft': [('readonly', False)]})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,4 +35,4 @@ class res_partner_bank(orm.Model):
|
||||
help=_('Banking mandates represents an authorization that the '
|
||||
'bank account owner gives to a company for a specific '
|
||||
'operation')),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class payment_line(orm.Model):
|
||||
'mandate_id': fields.many2one(
|
||||
'account.banking.mandate', 'Direct Debit Mandate',
|
||||
domain=[('state', '=', 'valid')]),
|
||||
}
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
''' If the customer invoice has a mandate, take it
|
||||
@@ -76,15 +76,15 @@ class payment_line(orm.Model):
|
||||
_("The payment line with reference '%s' has the bank "
|
||||
"account '%s' which is not attached to the mandate "
|
||||
"'%s' (this mandate is attached to the bank account "
|
||||
"'%s').") % (
|
||||
payline.name,
|
||||
self.pool['res.partner.bank'].name_get(
|
||||
cr, uid, [payline.bank_id.id])[0][1],
|
||||
payline.mandate_id.unique_mandate_reference,
|
||||
self.pool['res.partner.bank'].name_get(
|
||||
cr, uid,
|
||||
[payline.mandate_id.partner_bank_id.id])[0][1],
|
||||
))
|
||||
"'%s').") %
|
||||
(payline.name,
|
||||
self.pool['res.partner.bank'].name_get(
|
||||
cr, uid, [payline.bank_id.id])[0][1],
|
||||
payline.mandate_id.unique_mandate_reference,
|
||||
self.pool['res.partner.bank'].name_get(
|
||||
cr, uid,
|
||||
[payline.mandate_id.partner_bank_id.id])[0][1],)
|
||||
)
|
||||
return True
|
||||
|
||||
_constraints = [
|
||||
|
||||
Reference in New Issue
Block a user