line: datum in zukunft --> zeile grau
This commit is contained in:
parent
94d51b4ee2
commit
557a8b47ba
1 changed files with 4 additions and 2 deletions
6
line.py
6
line.py
|
@ -5,7 +5,7 @@
|
|||
|
||||
from trytond.model import ModelView, ModelSQL, Workflow, fields, Check
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Eval, If, Or, Bool
|
||||
from trytond.pyson import Eval, If, Or, Bool, Date
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.report import Report
|
||||
from trytond.exceptions import UserError
|
||||
|
@ -220,7 +220,9 @@ class Line(SecondCurrencyMixin, Workflow, ModelSQL, ModelView):
|
|||
def view_attributes(cls):
|
||||
return super().view_attributes() + [
|
||||
('/tree', 'visual',
|
||||
If(Eval('balance', 0) < 0, 'warning', '')),
|
||||
If(Eval('balance', 0) < 0, 'warning',
|
||||
If(Eval('date', Date()) > Date(), 'muted', '')
|
||||
)),
|
||||
]
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue