From 52ecb8ef237d99a8960cf189058fdb8414edaec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 13 Jul 2019 00:14:39 +0200 Subject: [PATCH] Change expand attribute into a factor issue8308 review275331002 --- 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(-) diff --git a/CHANGELOG b/CHANGELOG index 822e37383a..3458220312 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 --git a/doc/topics/views/index.rst b/doc/topics/views/index.rst index c3a5d1b7f4..eab95bb599 100644 --- a/doc/topics/views/index.rst +++ b/doc/topics/views/index.rst @@ -557,10 +557,10 @@ field * ``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 --git a/trytond/ir/ui/tree.rnc b/trytond/ir/ui/tree.rnc index f85383b545..818a2b1135 100644 --- a/trytond/ir/ui/tree.rnc +++ b/trytond/ir/ui/tree.rnc @@ -43,7 +43,7 @@ attlist.field &= 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 --git a/trytond/ir/ui/tree.rng b/trytond/ir/ui/tree.rng index ac15072248..e41e6fc340 100644 --- a/trytond/ir/ui/tree.rng +++ b/trytond/ir/ui/tree.rng @@ -1,6 +1,7 @@ + xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> tree @@ -135,10 +136,7 @@ expand - - 0 - 1 - +