book: berechnung des saldo gefixt, fehler bei ungültigem 'date' im context
This commit is contained in:
parent
56b4099fb3
commit
b81d5fc0f4
1 changed files with 5 additions and 1 deletions
6
book.py
6
book.py
|
@ -289,8 +289,12 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
|
||||||
], query=True)),
|
], query=True)),
|
||||||
]
|
]
|
||||||
if date_limit == True:
|
if date_limit == True:
|
||||||
|
dt1 = context.get('date', None)
|
||||||
|
dt2 = IrDate.today()
|
||||||
|
if not isinstance(dt1, type(dt2)):
|
||||||
|
dt1 = dt2
|
||||||
query.append(
|
query.append(
|
||||||
('date', '<=', context.get('date', IrDate.today()))
|
('date', '<=', dt1)
|
||||||
)
|
)
|
||||||
line_query = Line.search(query, query=True)
|
line_query = Line.search(query, query=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue