diff --git a/trytond/ir/ui/form.rnc b/trytond/ir/ui/form.rnc
index a9f350105a..83c2eec717 100644
--- a/trytond/ir/ui/form.rnc
+++ b/trytond/ir/ui/form.rnc
@@ -100,7 +100,7 @@ attlist.field &= [ a:defaultValue = "1" ] attribute xfill { "0" | "1" }?
attlist.field &= attribute help { text }?
attlist.field &= attribute width { text }?
attlist.field &= attribute height { text }?
-attlist.field &= attribute readonly { text }?
+attlist.field &= attribute readonly { "0" | "1" }?
attlist.field &=
[ a:defaultValue = "0" ] attribute tree_invisible { "0" | "1" }?
attlist.field &= attribute mode { text }?
diff --git a/trytond/ir/ui/form.rng b/trytond/ir/ui/form.rng
index 9e1ea62f88..91133a840d 100644
--- a/trytond/ir/ui/form.rng
+++ b/trytond/ir/ui/form.rng
@@ -346,7 +346,12 @@
-
+
+
+ 0
+ 1
+
+
diff --git a/trytond/ir/ui/tree.rnc b/trytond/ir/ui/tree.rnc
index 9cad2530fc..47334de58e 100644
--- a/trytond/ir/ui/tree.rnc
+++ b/trytond/ir/ui/tree.rnc
@@ -16,7 +16,7 @@ attlist.tree &=
[ a:defaultValue = "0" ] attribute toolbar { "0" | "1" }?
field = element field { attlist.field, empty }
attlist.field &= attribute name { text }
-attlist.field &= attribute readonly { text }?
+attlist.field &= attribute readonly { "0" | "1" }?
attlist.field &=
attribute widget {
"char"
diff --git a/trytond/ir/ui/tree.rng b/trytond/ir/ui/tree.rng
index 8e1e9801a7..5c33c33cc1 100644
--- a/trytond/ir/ui/tree.rng
+++ b/trytond/ir/ui/tree.rng
@@ -72,7 +72,12 @@
-
+
+
+ 0
+ 1
+
+