Support create/delete attribute in view

issue10840
review377341002
This commit is contained in:
Cédric Krier
2021-10-11 22:53:02 +02:00
parent b6678dfe19
commit ca372a24ec
6 changed files with 61 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Support create/delete attribute in view
* Skip default values when copying records
* Use global cache for Function fields in readonly transactions
* Add format method to DictSchemaMixin
+8
View File
@@ -154,6 +154,14 @@ List of attributes shared by many form elements:
:class:`trytond.model.fields.One2Many` to specifiy if the client must
auto-complete the field. The default value is True.
.. _common-attributes-create:
* ``create``: A boolean to specify if the user can create targets from the
widget. The default value is ``True``.
* ``delete``: A boolean to specify if the user can delete targets from the
widget. The default value is ``True``.
.. _common-attributes-factor:
* ``factor``: A factor to apply on fields
+4
View File
@@ -90,6 +90,10 @@ attlist.field &= attribute view_ids { text }?
attlist.field &= attribute product { text }?
attlist.field &=
[ a:defaultValue = "0" ] attribute invisible { "0" | "1" }?
attlist.field &=
[ a:defaultValue = "1" ] attribute create { "0" | "1" }?
attlist.field &=
[ a:defaultValue = "1" ] attribute delete { "0" | "1" }?
attlist.field &=
[ a:defaultValue = "left_to_right" ] attribute orientation {
"left_to_right"
+22
View File
@@ -380,6 +380,28 @@
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute a:defaultValue="1">
<name ns="">create</name>
<choice>
<value>0</value>
<value>1</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute a:defaultValue="1">
<name ns="">delete</name>
<choice>
<value>0</value>
<value>1</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute a:defaultValue="left_to_right">
+4
View File
@@ -51,6 +51,10 @@ attlist.field &= attribute icon { text }?
attlist.field &= attribute sum { text }?
attlist.field &= attribute width { text }?
attlist.field &= attribute height { text }?
attlist.field &=
[ a:defaultValue = "1" ] attribute create { "0" | "1" }?
attlist.field &=
[ a:defaultValue = "1" ] attribute delete { "0" | "1" }?
attlist.field &=
[ a:defaultValue = "left_to_right" ] attribute orientation {
"left_to_right"
+22
View File
@@ -189,6 +189,28 @@
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute a:defaultValue="1">
<name ns="">create</name>
<choice>
<value>0</value>
<value>1</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute a:defaultValue="1">
<name ns="">delete</name>
<choice>
<value>0</value>
<value>1</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute a:defaultValue="left_to_right">