diff --git a/account_statement_ext/statement.py b/account_statement_ext/statement.py index 54857212..392e0b9d 100644 --- a/account_statement_ext/statement.py +++ b/account_statement_ext/statement.py @@ -226,18 +226,14 @@ class AccountBankSatement(Model): # statement.company_id is a related store=True that for some # reason doesn't work in YAML tests. As a workaround, I unwind it # to statement.journal_id.company_id here. - if ( - statement.period_id - and statement.journal_id.company_id.id - != statement.period_id.company_id.id - ): + if (statement.period_id and + statement.journal_id.company_id.id != + statement.period_id.company_id.id): return False for line in statement.line_ids: - if ( - line.period_id - and statement.journal_id.company_id.id - != line.period_id.company_id.id - ): + if (line.period_id and + statement.journal_id.company_id.id + != line.period_id.company_id.id): return False return True