line: negativer saldo färbt zeile blass-rot

This commit is contained in:
Frederik Jaeckel 2022-10-08 16:20:59 +02:00
parent 5794a4ccb7
commit 94d51b4ee2

View file

@ -216,6 +216,13 @@ class Line(SecondCurrencyMixin, Workflow, ModelSQL, ModelView):
}, },
}) })
@classmethod
def view_attributes(cls):
return super().view_attributes() + [
('/tree', 'visual',
If(Eval('balance', 0) < 0, 'warning', '')),
]
@classmethod @classmethod
def migrate_amount_2nd_currency(cls): def migrate_amount_2nd_currency(cls):
""" add amount-2nd-currency """ add amount-2nd-currency