Client improvement: image widget

58 views
Skip to first unread message

Emma

unread,
May 3, 2012, 9:33:50 AM5/3/12
to try...@googlegroups.com
Hi again,

in the same context as https://groups.google.com/forum/?fromgroups#!topic/tryton/eE1IKJpQKjg I would like to be able to add icons in a tree view (in this case tryton-dialog-error.svg) inside a tree view but I guess this could be extended and render a binary field and well (scaled to fit the line height).

So my question is the same, if I code it and provide a patch, do you think it could be something of interest for the tryton community and would you be willing to integrate it to the official tryton client?

Thanks

Emma

Nicolas Évrard

unread,
May 3, 2012, 9:49:33 AM5/3/12
to try...@googlegroups.com
* Emma [2012-05-03 15:33 +0200]:
>Hi again,

Hello,

>in the same context
>as https://groups.google.com/forum/?fromgroups#!topic/tryton/eE1IKJpQKjg I
>would like to be able to add icons in a tree view (in this case
>tryton-dialog-error.svg) inside a tree view but I guess this could be
>extended and render a binary field and well (scaled to fit the line height).

In fact it is already available because we use it for the icons.
in ir/ui/icon.xml:

<record model="ir.ui.view" id="icon_view_tree">
<field name="model">ir.ui.icon</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Icons" sequence="sequence">
<field name="name" icon="name"/>
<field name="module"/>
<field name="path"/>
<field name="sequence" tree_invisible="1"/>
</tree>
]]>
</field>
</record>

the icon="name" will use the icon with the name coming from the name
field to display this icon.

--
Nicolas Évrard

B2CK SPRL
rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
E-mail/Jabber: nicolas...@b2ck.com
Website: http://www.b2ck.com/
signature.asc

Cédric Krier

unread,
May 3, 2012, 10:49:03 AM5/3/12
to try...@googlegroups.com
On 03/05/12 06:33 -0700, Emma wrote:
> Hi again,
>
> in the same context
> as https://groups.google.com/forum/?fromgroups#!topic/tryton/eE1IKJpQKjg I
> would like to be able to add icons in a tree view (in this case
> tryton-dialog-error.svg) inside a tree view but I guess this could be
> extended and render a binary field and well (scaled to fit the line height).

Icon in list views are already supported see the menu.

--
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric...@b2ck.com
Website: http://www.b2ck.com/

Emma

unread,
May 3, 2012, 11:41:59 AM5/3/12
to try...@googlegroups.com
On Thursday, 3 May 2012 15:49:33 UTC+2, Nicolas Évrard wrote:

In fact it is already available because we use it for the icons.
in ir/ui/icon.xml:


It works for "stock icons" but what about content of binary fields? 

Nicolas Évrard

unread,
May 3, 2012, 11:47:08 AM5/3/12
to try...@googlegroups.com
* Emma [2012-05-03 17:41 +0200]:
Of course it won't work.
But if you're using icons to transmit a message I think you should use
stock icons and if it is not available you should register an icon for
that.

For the binary fields indeed there is no support for an image widget
in a tree view. I'm not sure if it's a good idea but it does not shock
me as much as changing the color of the form.

--
(°> Nicolas Évrard
( ) Liège

signature.asc

Nicolas Évrard

unread,
May 4, 2012, 8:58:34 AM5/4/12
to try...@googlegroups.com
* Nicolas Évrard [2012-05-03 17:47 +0200]:
>But if you're using icons to transmit a message I think you should use
>stock icons and if it is not available you should register an icon for
>that.

Obviously I meant register the icon into tryton.

But to be back on the topic, I think that a patch adding the image
widget to the list view would be accepted.
signature.asc

Guillem Barba Domingo

unread,
May 8, 2012, 9:08:27 AM5/8/12
to try...@googlegroups.com
2012/5/4 Nicolas Évrard <nicolas...@b2ck.com>

* Nicolas Évrard  [2012-05-03 17:47 +0200]:
But if you're using icons to transmit a message I think you should use
stock icons and if it is not available you should register an icon for
that.

Obviously I meant register the icon into tryton.

But to be back on the topic, I think that a patch adding the image
widget to the list view would be accepted.

It's an interesting feature!

--
Guillem Barba
http://www.guillem.alcarrer.net

Emma

unread,
May 8, 2012, 11:01:18 AM5/8/12
to try...@googlegroups.com


But to be back on the topic, I think that a patch adding the image
widget to the list view would be accepted.


Ok, I'll try to work on this by the end of the week 
Reply all
Reply to author
Forward
0 new messages