From 0918f6f42594804ca969a590a4d5bb37f341d55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Wed, 5 Jul 2023 10:08:42 +0200 Subject: [PATCH] Allow to use width attribute in button columns of tree views --- trytond/doc/topics/views/index.rst | 5 ++++- trytond/trytond/ir/ui/tree.rnc | 1 + trytond/trytond/ir/ui/tree.rng | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/trytond/doc/topics/views/index.rst b/trytond/doc/topics/views/index.rst index 41f879cc23..fa3f3d0846 100644 --- a/trytond/doc/topics/views/index.rst +++ b/trytond/doc/topics/views/index.rst @@ -752,7 +752,10 @@ displayed in the same column with the attributes: button ------ -Same as form-button_. +Same as form-button_ with the addition of: + +``width`` + The width of the column. List-Form ========= diff --git a/trytond/trytond/ir/ui/tree.rnc b/trytond/trytond/ir/ui/tree.rnc index 07a7308d9b..9024f9ba56 100644 --- a/trytond/trytond/ir/ui/tree.rnc +++ b/trytond/trytond/ir/ui/tree.rnc @@ -96,6 +96,7 @@ attlist.button &= attribute change { text }? attlist.button &= attribute type { "class" | "instance" }? attlist.button &= [ a:defaultValue = "0" ] attribute tree_invisible { text }? +attlist.button &= attribute width { text }? data = element data { attlist.data, xpath* } attlist.data &= empty xpath = element xpath { attlist.xpath, diff --git a/trytond/trytond/ir/ui/tree.rng b/trytond/trytond/ir/ui/tree.rng index 36356d0814..96be5760a1 100644 --- a/trytond/trytond/ir/ui/tree.rng +++ b/trytond/trytond/ir/ui/tree.rng @@ -487,6 +487,14 @@ + + + + width + + + + data