[PEP8] Fix pep8 errors

This commit is contained in:
EL HADJI DEM
2014-10-08 11:33:46 -04:00
parent 070afd2fb9
commit 0a776bd4af
4 changed files with 16 additions and 16 deletions

View File

@@ -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', '/') == '/':

View File

@@ -32,4 +32,4 @@ class account_invoice(orm.Model):
'account.banking.mandate', 'Direct Debit Mandate',
domain=[('state', '=', 'valid')], readonly=True,
states={'draft': [('readonly', False)]})
}
}

View File

@@ -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')),
}
}

View File

@@ -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 = [