line: beachtet nur buchungen bis zum aktuellen tag
This commit is contained in:
parent
8302dac3a1
commit
04709e3d4a
1 changed files with 4 additions and 0 deletions
4
line.py
4
line.py
|
@ -176,6 +176,7 @@ class EvaluationLine(ModelSQL, ModelView):
|
||||||
Lines = pool.get('cashbook.line')
|
Lines = pool.get('cashbook.line')
|
||||||
Cashbook = pool.get('cashbook.book')
|
Cashbook = pool.get('cashbook.book')
|
||||||
Currency = pool.get('currency.currency')
|
Currency = pool.get('currency.currency')
|
||||||
|
IrDate = pool.get('ir.date')
|
||||||
tab_line = Lines.__table__()
|
tab_line = Lines.__table__()
|
||||||
tab_book = Cashbook.__table__()
|
tab_book = Cashbook.__table__()
|
||||||
cursor = Transaction().connection.cursor()
|
cursor = Transaction().connection.cursor()
|
||||||
|
@ -191,6 +192,7 @@ class EvaluationLine(ModelSQL, ModelView):
|
||||||
lines = Lines.search([
|
lines = Lines.search([
|
||||||
('cashbook.btype.id', '=', self.dtype.id),
|
('cashbook.btype.id', '=', self.dtype.id),
|
||||||
('cashbook.state', '=', 'open'),
|
('cashbook.state', '=', 'open'),
|
||||||
|
('date', '<=', IrDate.today()),
|
||||||
], query=True)
|
], query=True)
|
||||||
|
|
||||||
query = lines.join(tab_line, condition=lines.id==tab_line.id,
|
query = lines.join(tab_line, condition=lines.id==tab_line.id,
|
||||||
|
@ -221,6 +223,7 @@ class EvaluationLine(ModelSQL, ModelView):
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
Lines = pool.get('cashbook.line')
|
Lines = pool.get('cashbook.line')
|
||||||
Currency = pool.get('currency.currency')
|
Currency = pool.get('currency.currency')
|
||||||
|
IrDate = pool.get('ir.date')
|
||||||
tab_line = Lines.__table__()
|
tab_line = Lines.__table__()
|
||||||
cursor = Transaction().connection.cursor()
|
cursor = Transaction().connection.cursor()
|
||||||
|
|
||||||
|
@ -235,6 +238,7 @@ class EvaluationLine(ModelSQL, ModelView):
|
||||||
lines = Lines.search([
|
lines = Lines.search([
|
||||||
('cashbook.currency.id', '=', self.currency.id),
|
('cashbook.currency.id', '=', self.currency.id),
|
||||||
('cashbook.state', '=', 'open'),
|
('cashbook.state', '=', 'open'),
|
||||||
|
('date', '<=', IrDate.today()),
|
||||||
], query=True)
|
], query=True)
|
||||||
|
|
||||||
query = lines.join(tab_line, condition=lines.id==tab_line.id,
|
query = lines.join(tab_line, condition=lines.id==tab_line.id,
|
||||||
|
|
Loading…
Reference in a new issue