changeset 6192:407e4f7c8c0d

Allow field name on image tag issue7058 review43891002
author Cédric Krier <ced@b2ck.com>
date Tue, 23 Jan 2018 22:13:30 +0100
parents 04a48d9b5522
children 052a3d2f1cd4
files CHANGELOG doc/topics/views/index.rst trytond/ir/view/icon_view_form.xml
diffstat 3 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Sun Jan 21 19:57:11 2018 +0100
+++ b/CHANGELOG	Tue Jan 23 22:13:30 2018 +0100
@@ -1,3 +1,4 @@
+* Allow field name on image tag
 * Remove unoconv and call soffice directly
 * Allow to include mixin to pool objects
 * Improve validation of PYSON domain
--- a/doc/topics/views/index.rst	Sun Jan 21 19:57:11 2018 +0100
+++ b/doc/topics/views/index.rst	Tue Jan 23 22:13:30 2018 +0100
@@ -279,8 +279,8 @@
 
 Display an image.
 
-    * ``name``: the name of the image. It must be the name of a record of
-      `ir.ui.icon`.
+    * ``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`.
 
     * ``yexpand``: see in common-attributes-yexpand_.
 
--- a/trytond/ir/view/icon_view_form.xml	Sun Jan 21 19:57:11 2018 +0100
+++ b/trytond/ir/view/icon_view_form.xml	Tue Jan 23 22:13:30 2018 +0100
@@ -2,12 +2,15 @@
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
 <form>
-    <label name="name"/>
-    <field name="name"/>
-    <label name="sequence"/>
-    <field name="sequence"/>
-    <label name="module"/>
-    <field name="module"/>
-    <label name="path"/>
-    <field name="path"/>
+    <image name="name" xexpand="0"/>
+    <group id="form">
+        <label name="name"/>
+        <field name="name"/>
+        <label name="sequence"/>
+        <field name="sequence"/>
+        <label name="module"/>
+        <field name="module"/>
+        <label name="path"/>
+        <field name="path"/>
+    </group>
 </form>

Repository Layout

/ Tryton top level repositories
modules Modules
public Public repositories
tpf Tryton Foundation repositories
sandbox Sandbox