Add creatable attribute on tree and form views

issue10929
review370201002
This commit is contained in:
Cédric Krier
2021-12-16 22:26:04 +01:00
parent e4529b45ee
commit 91f8217557
6 changed files with 33 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add creatable attribute on tree and form views
* Fill local cache of Function field instances with values
* Cache Function field getter without context in readonly transactions
* Use expire delay instead of UTC datetime in reset password email
+6
View File
@@ -204,6 +204,9 @@ Each form view must start with this tag.
The method must be registered in :attr:`trytond.model.Model.__rpc__`.
..
* ``creatable``: A boolean to specify if the form can be used to create new
record. The default value is ``true``.
* ``col``: see in common-attributes-col_.
* ``cursor``: The name of the field that must have the cursor by default.
@@ -586,6 +589,9 @@ Each tree view must start with this tag.
* ``editable``: A boolean to specify if the list is editable.
* ``creatable``: A boolean to specify if the editable list can be used to
create new record. The default value is ``true``.
* ``sequence``: The name of the field that is used for sorting. This field
must be an integer and it will be updated to match the new sort order
when the user uses ``Drag and Drop`` on list rows.
+2
View File
@@ -16,6 +16,8 @@ form =
| vpaned)*
}
attlist.form &= attribute on_write { text }?
attlist.form &=
[ a:defaultValue = "1" ] attribute creatable { "0" | "1" }?
attlist.form &= [ a:defaultValue = "4" ] attribute col { text }?
attlist.form &= attribute cursor { text }?
+11
View File
@@ -30,6 +30,17 @@
</attribute>
</optional>
</define>
<define name="attlist.form" combine="interleave">
<optional>
<attribute a:defaultValue="1">
<name ns="">creatable</name>
<choice>
<value>0</value>
<value>1</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.form" combine="interleave">
<optional>
<attribute a:defaultValue="4">
+2
View File
@@ -6,6 +6,8 @@ tree = element tree { attlist.tree,
}
attlist.tree &= attribute on_write { text }?
attlist.tree &= attribute editable { "0" | "1" }?
attlist.tree &=
[ a:defaultValue = "1" ] attribute creatable { "0" | "1" }?
attlist.tree &= attribute sequence { text }?
attlist.tree &=
[ a:defaultValue = "0" ] attribute keyword_open { "0" | "1" }?
+11
View File
@@ -33,6 +33,17 @@
</attribute>
</optional>
</define>
<define name="attlist.tree" combine="interleave">
<optional>
<attribute a:defaultValue="1">
<name ns="">creatable</name>
<choice>
<value>0</value>
<value>1</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.tree" combine="interleave">
<optional>
<attribute>