Remove colors attribute on tree view
issue4861 review16551002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Remove colors attribute on tree view
|
||||
* Remove style on Report
|
||||
* Add StateReport to Wizard
|
||||
* Allow to override ModelSQL._table
|
||||
|
||||
@@ -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
@@ -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:
|
||||
|
||||
@@ -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 &=
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user