diff --git a/line.py b/line.py index bfece53..6d04217 100644 --- a/line.py +++ b/line.py @@ -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 def migrate_amount_2nd_currency(cls): """ add amount-2nd-currency