optimize search-queries, line: fix state-selection

This commit is contained in:
Frederik Jaeckel 2023-07-24 17:31:34 +02:00
parent e605d5f0d3
commit 90298d3eb8
6 changed files with 20 additions and 20 deletions

View file

@ -55,7 +55,7 @@ class RunCbReportStart(ModelView):
if self.cashbook:
recons = Recon2.search([
('cashbook.id', '=', self.cashbook.id),
('cashbook', '=', self.cashbook.id),
], order=[('date_from', 'DESC')])
return [x.id for x in recons]
@ -103,7 +103,7 @@ class RunCbReport(Wizard):
result['cashbook'] = result['cashbooks'][0]
recons = Recon2.search([
('cashbook.id', '=', result['cashbook']),
('cashbook', '=', result['cashbook']),
], order=[('date_from', 'DESC')])
if len(recons) > 0:
result['reconciliations'] = [x.id for x in recons]