changeset b639c809bd13 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=b639c809bd13
description:
Change expand attribute into a factor
issue8308
review275331002
diffstat:
CHANGELOG | 1 +
doc/topics/views/index.rst | 8 ++++----
trytond/ir/ui/tree.rnc | 2 +-
trytond/ir/ui/tree.rng | 8 +++-----
4 files changed, 9 insertions(+), 10 deletions(-)
diffs (62 lines):
diff -r 18ff0e067a0a -r b639c809bd13 CHANGELOG
--- a/CHANGELOG Sat Jul 13 00:08:56 2019 +0200
+++ b/CHANGELOG Sat Jul 13 00:14:39 2019 +0200
@@ -1,3 +1,4 @@
+* Change expand attribute into a factor
* Allow SQL expression as value of fields
* Allow customizing Dict keys order with a sequence field
* Add invalid domain in DomainValidationError
diff -r 18ff0e067a0a -r b639c809bd13 doc/topics/views/index.rst
--- a/doc/topics/views/index.rst Sat Jul 13 00:08:56 2019 +0200
+++ b/doc/topics/views/index.rst Sat Jul 13 00:14:39 2019 +0200
@@ -557,10 +557,10 @@
* ``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.
+ * ``expand``: An integer that specifies if the column should be expanded to
+ take available extra space in the view. This space is shared
+ proportionaly among all columns that have their "expand" property set.
+ Resize doesn't work if this option is enabled.
* ``pre_validate``: see in common-attributes-pre_validate_.
diff -r 18ff0e067a0a -r b639c809bd13 trytond/ir/ui/tree.rnc
--- a/trytond/ir/ui/tree.rnc Sat Jul 13 00:08:56 2019 +0200
+++ b/trytond/ir/ui/tree.rnc Sat Jul 13 00:14:39 2019 +0200
@@ -43,7 +43,7 @@
attlist.field &=
[ a:defaultValue = "0" ] attribute tree_invisible { text }?
attlist.field &=
- [ a:defaultValue = "0" ] attribute expand { "0" | "1" }?
+ [ a:defaultValue = "0" ] attribute expand { xsd:integer }?
attlist.field &= attribute icon { text }?
attlist.field &= attribute sum { text }?
attlist.field &= attribute width { text }?
diff -r 18ff0e067a0a -r b639c809bd13 trytond/ir/ui/tree.rng
--- a/trytond/ir/ui/tree.rng Sat Jul 13 00:08:56 2019 +0200
+++ b/trytond/ir/ui/tree.rng Sat Jul 13 00:14:39 2019 +0200
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">
+ xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<define name="tree">
<element>
<name ns="">tree</name>
@@ -135,10 +136,7 @@
<optional>
<attribute a:defaultValue="0">
<name ns="">expand</name>
- <choice>
- <value>0</value>
- <value>1</value>
- </choice>
+ <data type="integer"/>
</attribute>
</optional>
</define>