From 7a223d3b5e46129eebaec3842db79aa2b5cc141c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 22 Aug 2015 09:00:14 +0200 Subject: [PATCH] Remove colors attribute on tree view issue4861 review16551002 --- CHANGELOG | 1 + doc/topics/views/index.rst | 3 --- trytond/ir/module.py | 11 +---------- trytond/ir/ui/tree.rnc | 1 - trytond/ir/ui/tree.rng | 5 ----- trytond/ir/ui/view.py | 2 +- 6 files changed, 3 insertions(+), 20 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index aba7a66582..b1d9884e03 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Remove colors attribute on tree view * Remove style on Report * Add StateReport to Wizard * Allow to override ModelSQL._table diff --git a/doc/topics/views/index.rst b/doc/topics/views/index.rst index 479670c065..eda830c892 100644 --- a/doc/topics/views/index.rst +++ b/doc/topics/views/index.rst @@ -497,9 +497,6 @@ Each tree view must start with this tag. must be an integer and it will be updated to match the new sort order when the user uses ``Drag and Drop`` on list rows. - * ``colors``: A PySON string that will be evaluated for each record. A - string containing the name of the color will be returned. - * ``keyword_open``: A boolean to specify if the client should look for a tree_open action on double click instead of switching view. diff --git a/trytond/ir/module.py b/trytond/ir/module.py index a7859e3b34..ffae83ca96 100644 --- a/trytond/ir/module.py +++ b/trytond/ir/module.py @@ -11,7 +11,7 @@ from trytond.wizard import Wizard, StateView, Button, StateTransition, \ from trytond import backend from trytond.pool import Pool from trytond.transaction import Transaction -from trytond.pyson import Eval, If +from trytond.pyson import Eval from trytond.rpc import RPC __all__ = [ @@ -135,15 +135,6 @@ class Module(ModelSQL, ModelView): child_ids[name2id[dep.name]].append(child.id) return child_ids - @classmethod - def view_attributes(cls): - return [('/tree', 'colors', - If(Eval('state').in_(['to upgrade', 'to install']), - 'blue', - If(Eval('state') == 'uninstalled', - 'grey', - 'black')))] - @classmethod def delete(cls, records): for module in records: diff --git a/trytond/ir/ui/tree.rnc b/trytond/ir/ui/tree.rnc index e42ec0d214..7d7e008377 100644 --- a/trytond/ir/ui/tree.rnc +++ b/trytond/ir/ui/tree.rnc @@ -9,7 +9,6 @@ attlist.tree &= attlist.tree &= attribute on_write { text }? attlist.tree &= attribute editable { "top" | "bottom" }? attlist.tree &= attribute sequence { text }? -attlist.tree &= attribute colors { text }? attlist.tree &= [ a:defaultValue = "0" ] attribute keyword_open { "0" | "1" }? attlist.tree &= diff --git a/trytond/ir/ui/tree.rng b/trytond/ir/ui/tree.rng index 44a5d3c96d..3a970d2da6 100644 --- a/trytond/ir/ui/tree.rng +++ b/trytond/ir/ui/tree.rng @@ -36,11 +36,6 @@ - - - - - diff --git a/trytond/ir/ui/view.py b/trytond/ir/ui/view.py index ce2f07ccf9..0492ad4296 100644 --- a/trytond/ir/ui/view.py +++ b/trytond/ir/ui/view.py @@ -155,7 +155,7 @@ class View(ModelSQL, ModelView): } def encode(element): - for attr in ('states', 'domain', 'spell', 'colors'): + for attr in ('states', 'domain', 'spell'): if element.get(attr): try: value = PYSONDecoder().decode(element.get(attr))