book: berechnung des saldo gefixt, fehler bei ungültigem 'date' im context
This commit is contained in:
parent
ef32bd79f9
commit
a521064ddf
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)),
|
||||
]
|
||||
if date_limit == True:
|
||||
dt1 = context.get('date', None)
|
||||
dt2 = IrDate.today()
|
||||
if not isinstance(dt1, type(dt2)):
|
||||
dt1 = dt2
|
||||
query.append(
|
||||
('date', '<=', context.get('date', IrDate.today()))
|
||||
('date', '<=', dt1)
|
||||
)
|
||||
line_query = Line.search(query, query=True)
|
||||
|
||||
|
|
Loading…
Reference in a new issue