From a690d018e7e20f579c36f54ba2e4d2ed8fba31e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 27 Feb 2015 15:47:35 +0100 Subject: [PATCH] [FIX] flake8 W503 --- account_banking_mandate/models/payment_line.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/account_banking_mandate/models/payment_line.py b/account_banking_mandate/models/payment_line.py index 249b97715..9a176cf61 100644 --- a/account_banking_mandate/models/payment_line.py +++ b/account_banking_mandate/models/payment_line.py @@ -40,12 +40,12 @@ class PaymentLine(models.Model): vals = {} partner_bank_id = vals.get('bank_id') move_line_id = vals.get('move_line_id') - if (self.env.context.get('search_payment_order_type') == 'debit' - and 'mandate_id' not in vals): + if (self.env.context.get('search_payment_order_type') == 'debit' and + 'mandate_id' not in vals): if move_line_id: line = self.env['account.move.line'].browse(move_line_id) - if (line.invoice and line.invoice.type == 'out_invoice' - and line.invoice.mandate_id): + if (line.invoice and line.invoice.type == 'out_invoice' and + line.invoice.mandate_id): vals.update({ 'mandate_id': line.invoice.mandate_id.id, 'bank_id': line.invoice.mandate_id.partner_bank_id.id, @@ -61,8 +61,8 @@ class PaymentLine(models.Model): @api.one @api.constrains('mandate_id', 'bank_id') def _check_mandate_bank_link(self): - if (self.mandate_id and self.bank_id - and self.mandate_id.partner_bank_id.id != + if (self.mandate_id and self.bank_id and + self.mandate_id.partner_bank_id.id != self.bank_id.id): raise exceptions.Warning( _("The payment line with reference '%s' has the bank account "