mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[RFR] Do not overwrite super method when possible
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user