mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[FIX] Make sure that search() called with count=True returns correct value. (#94)
This commit is contained in:
committed by
Stefan Rijnhart (Opener)
parent
0e609ce176
commit
55f522fdb5
@@ -45,9 +45,8 @@ class ResPartnerBank(models.Model):
|
|||||||
self.sanitized_acc_number = self._sanitize_account_number(
|
self.sanitized_acc_number = self._sanitize_account_number(
|
||||||
self.acc_number)
|
self.acc_number)
|
||||||
|
|
||||||
@api.returns('self')
|
@api.model
|
||||||
def search(self, cr, user, args, offset=0, limit=None, order=None,
|
def search(self, args, offset=0, limit=None, order=None, count=False):
|
||||||
context=None, count=False):
|
|
||||||
pos = 0
|
pos = 0
|
||||||
while pos < len(args):
|
while pos < len(args):
|
||||||
if args[pos][0] == 'acc_number':
|
if args[pos][0] == 'acc_number':
|
||||||
@@ -62,5 +61,4 @@ class ResPartnerBank(models.Model):
|
|||||||
args[pos] = ('sanitized_acc_number', op, value)
|
args[pos] = ('sanitized_acc_number', op, value)
|
||||||
pos += 1
|
pos += 1
|
||||||
return super(ResPartnerBank, self).search(
|
return super(ResPartnerBank, self).search(
|
||||||
cr, user, args, offset=offset, limit=limit, order=order,
|
args, offset=offset, limit=limit, order=order, count=count)
|
||||||
context=context, count=count)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user