Add icon of type URL

issue10140
review355171002
This commit is contained in:
Cédric Krier
2021-03-20 12:38:16 +01:00
parent d4e228a29f
commit 71dcac9bbc
6 changed files with 59 additions and 4 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add URL type to icon
* Use instance method to get next sequence value
* Store the sequence type directly on sequence
* Allow sending email with record's attachments
+18 -4
View File
@@ -296,13 +296,21 @@ Display a field of the object with the value of the current record.
* ``help_field``: see in common-attributes-help_field_.
.. _form-image:
image
^^^^^
Display an image.
* ``name``: the image name or the field name which contains the image name.
The image name must be the name of a record of ``ir.ui.icon``.
* ``type``: the type of image source. Available values are ``icon`` or
``url``. The default value is ``icon``.
* ``name``: The image name or the field name which contains the image name.
For the ``icon`` type it must be the name of a record of ``ir.ui.icon``.
For the ``url`` type it must be the URL. It can be relative to the server.
* ``url_size``: the name of the size parameter to add to the URL.
* ``yexpand``: see in common-attributes-yexpand_.
@@ -628,8 +636,14 @@ diplayed in the same column.
* ``name``: The name of the field whose value will be displayed.
* ``icon``: The name of the field that contains the name of the icon to
display or the name of the icon.
* ``icon``: The image name or the field name which contains the image name.
For the ``icon`` type it must be the name of a record of ``ir.ui.icon``.
For the ``url`` type it must be the URL. It can be relative to the server.
* ``icon_type``: the type of icon source. Available values are ``icon`` or
``url``. The default value is ``icon``.
* ``url_size``: the name of the size parameter to add to the URL.
button
^^^^^^
+2
View File
@@ -111,6 +111,8 @@ attlist.field &=
attlist.field &= attribute symbol { text }?
image = element image { attlist.image, empty }
attlist.image &= attribute name { text }
attlist.image &= [a:defaultValue = "icon"] attribute type { "icon" | "url" }
attlist.affix &= attribute url_size { text }?
attlist.image &= [ a:defaultValue = "1" ] attribute colspan { text }?
attlist.image &=
[ a:defaultValue = "0" ] attribute yexpand { "0" | "1" }?
+17
View File
@@ -505,6 +505,23 @@
<text/>
</attribute>
</define>
<define name="attlist.image" combine="interleave">
<attribute a:defaultValue="icon">
<name ns="">type</name>
<choice>
<value>icon</value>
<value>url</value>
</choice>
</attribute>
</define>
<define name="attlist.affix" combine="interleave">
<optional>
<attribute>
<name ns="">url_size</name>
<text/>
</attribute>
</optional>
</define>
<define name="attlist.image" combine="interleave">
<optional>
<attribute a:defaultValue="1">
+2
View File
@@ -71,6 +71,8 @@ suffix = element suffix { attlist.affix, empty }
attlist.affix &= attribute string { text }?
attlist.affix &= ( attribute name { text } | attribute id { text } )
attlist.affix &= attribute icon { text }?
attlist.affix &= [a:defaultValue = "icon"] attribute icon_type { "icon" | "url" }?
attlist.affix &= attribute url_size { text }?
button = element button { attlist.button, empty }
attlist.button &= attribute help { text }?
attlist.button &= attribute string { text }?
+19
View File
@@ -314,6 +314,25 @@
</attribute>
</optional>
</define>
<define name="attlist.affix" combine="interleave">
<optional>
<attribute a:defaultValue="icon">
<name ns="">icon_type</name>
<choice>
<value>icon</value>
<value>url</value>
</choice>
</attribute>
</optional>
</define>
<define name="attlist.affix" combine="interleave">
<optional>
<attribute>
<name ns="">url_size</name>
<text/>
</attribute>
</optional>
</define>
<define name="button">
<element>
<name ns="">button</name>