From bc565493c89b950cbd086ae0aa02223dd461b3a3 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] flake8 W503 --- .../models/account_banking_mandate.py | 19 ++++++++++--------- .../wizard/export_sdd.py | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/account_banking_sepa_direct_debit/models/account_banking_mandate.py b/account_banking_sepa_direct_debit/models/account_banking_mandate.py index 4df706378..170866798 100644 --- a/account_banking_sepa_direct_debit/models/account_banking_mandate.py +++ b/account_banking_sepa_direct_debit/models/account_banking_mandate.py @@ -80,8 +80,8 @@ class AccountBankingMandate(models.Model): @api.one @api.constrains('type', 'recurrent_sequence_type') def _check_recurring_type(self): - if (self.type == 'recurrent' - and not self.recurrent_sequence_type): + if (self.type == 'recurrent' and + not self.recurrent_sequence_type): raise exceptions.Warning( _("The recurrent mandate '%s' must have a sequence type.") % self.unique_mandate_reference) @@ -89,8 +89,8 @@ class AccountBankingMandate(models.Model): @api.one @api.constrains('type', 'recurrent_sequence_type', 'sepa_migrated') def _check_migrated_to_sepa(self): - if (self.type == 'recurrent' and not self.sepa_migrated - and self.recurrent_sequence_type != 'first'): + if (self.type == 'recurrent' and not self.sepa_migrated and + self.recurrent_sequence_type != 'first'): raise exceptions.Warning( _("The recurrent mandate '%s' which is not marked as " "'Migrated to SEPA' must have its recurrent sequence type " @@ -99,8 +99,8 @@ class AccountBankingMandate(models.Model): @api.one @api.constrains('type', 'original_mandate_identification', 'sepa_migrated') def _check_original_mandate_identification(self): - if (self.type == 'recurrent' and not self.sepa_migrated - and not self.original_mandate_identification): + if (self.type == 'recurrent' and not self.sepa_migrated and + not self.original_mandate_identification): raise exceptions.Warning( _("You must set the 'Original Mandate Identification' on the " "recurrent mandate '%s' which is not marked as 'Migrated to " @@ -111,9 +111,10 @@ class AccountBankingMandate(models.Model): def mandate_partner_bank_change(self): super(AccountBankingMandate, self).mandate_partner_bank_change() res = {} - if (self.state == 'valid' and self.partner_bank_id - and self.type == 'recurrent' - and self.recurrent_sequence_type != 'first'): + if (self.state == 'valid' and + self.partner_bank_id and + self.type == 'recurrent' and + self.recurrent_sequence_type != 'first'): self.recurrent_sequence_type = 'first' res['warning'] = { 'title': _('Mandate update'), diff --git a/account_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py index aa46ff8b1..2fffdda65 100644 --- a/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -103,8 +103,8 @@ class BankingExportSddWizard(orm.TransientModel): previous_payline_id = False for older_line in older_lines: older_line_date_sent = older_line.order_id.date_sent - if (older_line_date_sent - and older_line_date_sent > previous_date): + if (older_line_date_sent and + older_line_date_sent > previous_date): previous_date = older_line_date_sent previous_payline_id = older_line.id if previous_payline_id: