From dfa4fc297e7a5563843d65619cb4ed2066045793 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Sun, 7 Apr 2013 22:27:20 +0200 Subject: [PATCH] [RFR] Do not overwrite super method when possible --- account_banking/account_banking.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/account_banking/account_banking.py b/account_banking/account_banking.py index 68a8339d2..c14e3ba6f 100644 --- a/account_banking/account_banking.py +++ b/account_banking/account_banking.py @@ -303,14 +303,12 @@ class account_bank_statement(orm.Model): move of period_id to the statement line """ for statement in self.browse(cr, uid, ids, context=context): - if (statement.period_id and - statement.company_id.id != statement.period_id.company_id.id): - return False for line in statement.line_ids: if (line.period_id and statement.company_id.id != line.period_id.company_id.id): return False - return True + return super(account_bank_statement, self)._check_company_id( + cr, uid, ids, context=context) # Redefine the constraint, or it still refer to the original method _constraints = [