Improve column space in tree view

issue2488
review286001
This commit is contained in:
Sebastian Marro
2012-03-23 15:36:11 -03:00
parent 584d516067
commit 73c54ca472
8 changed files with 28 additions and 26 deletions
+1
View File
@@ -1,3 +1,4 @@
* Replace fill by expand
* Integer, Numeric and Float allow None as value
* NULL value is None and not False
* Replace user action by a list of actions
+5 -3
View File
@@ -447,9 +447,6 @@ Each tree view must start with this tag.
* ``colors``: A PySON string that will be evaluated for each record. A
string containing the name of the color will be returned.
* ``fill``: A boolean to specify if the last column must fill the remaining
free space in the view.
* ``keyword_open``: A boolean to specify if the client should look for a
tree_open action on double click instead of switching view.
@@ -473,6 +470,11 @@ field
list with the sum of all the fields in the column.
* ``width``: Set the width of the column.
* ``expand``: Boolean to specify if the column should be expanded to take
available extra space in the view. This space is shared equally among all
columns that have their "expand" property set to True. Resize don't work
if this option is enabled.
Example
-------
+2 -2
View File
@@ -289,9 +289,9 @@ this repository contains the full copyright notices and license terms. -->
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<![CDATA[
<tree string="Views" sequence="sequence" fill="1">
<tree string="Views" sequence="sequence">
<field name="sequence" tree_invisible="1"/>
<field name="view"/>
<field name="view" expand="1"/>
</tree>
]]>
</field>
+4 -4
View File
@@ -10,8 +10,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<![CDATA[
<tree string="Menu" keyword_open="1" fill="1">
<field name="name" icon="icon"/>
<tree string="Menu" keyword_open="1">
<field name="name" icon="icon" expand="1"/>
</tree>
]]>
</field>
@@ -23,8 +23,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<![CDATA[
<tree string="Menu" fill="1">
<field name="complete_name" icon="icon"/>
<tree string="Menu">
<field name="complete_name" icon="icon" expand="1"/>
</tree>
]]>
</field>
+2 -2
View File
@@ -10,8 +10,6 @@ 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 fill { "0" | "1" }?
attlist.tree &=
[ a:defaultValue = "0" ] attribute keyword_open { "0" | "1" }?
field = element field { attlist.field, empty }
@@ -39,6 +37,8 @@ attlist.field &=
}?
attlist.field &=
[ a:defaultValue = "0" ] attribute tree_invisible { "0" | "1" }?
attlist.field &=
[ a:defaultValue = "0" ] attribute expand { "0" | "1" }?
attlist.field &= attribute icon { text }?
attlist.field &= attribute sum { text }?
attlist.field &= attribute width { text }?
+10 -10
View File
@@ -41,16 +41,6 @@
<attribute name="colors"/>
</optional>
</define>
<define name="attlist.tree" combine="interleave">
<optional>
<attribute name="fill" a:defaultValue="0">
<choice>
<value>0</value>
<value>1</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.tree" combine="interleave">
<optional>
<attribute name="keyword_open" a:defaultValue="0">
@@ -115,6 +105,16 @@
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute name="expand" a:defaultValue="0">
<choice>
<value>0</value>
<value>1</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute name="icon"/>
+2 -3
View File
@@ -131,9 +131,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Shortcuts" keyword_open="1" fill="1"
sequence="sequence">
<field name="name"/>
<tree string="Shortcuts" keyword_open="1" sequence="sequence">
<field name="name" expand="1"/>
</tree>
]]>
</field>
+2 -2
View File
@@ -34,8 +34,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Groups" fill="1">
<field name="name"/>
<tree string="Groups">
<field name="name" expand="1"/>
</tree>
]]>
</field>