Add visual context on tree view

issue8562
review261951002
This commit is contained in:
Cédric Krier committed 2019-09-20 11:47:15 +02:00
1 parent ad4deb80be
commit cf67e31260
1 file changed
+6
+6
View File
@@ -409,6 +409,12 @@ class Statement(Workflow, ModelSQL, ModelView):
for key, lines in groupby(lines, key=self._group_key):
yield Line(**dict(key + (('lines', list(lines)),)))
@classmethod
def view_attributes(cls):
return [
('/tree', 'visual', If(Eval('state') == 'cancel', 'muted', '')),
]
@classmethod
def delete(cls, statements):
# Cancel before delete