Remove colors attribute on tree view

issue4861
review16551002
This commit is contained in:
Cédric Krier
2015-08-22 09:00:14 +02:00
parent b19e93e3a9
commit 7a223d3b5e
6 changed files with 3 additions and 20 deletions
+1
View File
@@ -1,3 +1,4 @@
* Remove colors attribute on tree view
* Remove style on Report
* Add StateReport to Wizard
* Allow to override ModelSQL._table
-3
View File
@@ -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.
+1 -10
View File
@@ -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:
-1
View File
@@ -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 &=
-5
View File
@@ -36,11 +36,6 @@
<attribute name="sequence"/>
</optional>
</define>
<define name="attlist.tree" combine="interleave">
<optional>
<attribute name="colors"/>
</optional>
</define>
<define name="attlist.tree" combine="interleave">
<optional>
<attribute name="keyword_open" a:defaultValue="0">
+1 -1
View File
@@ -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))