Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

I'm trying to add a label for a button in a tree view but I have no ideia how to do it.

By
Jeferson M. Moreira
on 10/19/16, 10:09 AM 218 views

I'm trying to add a label for a button in a tree view but I have no ideia how to do it.
I have tried to use the label tag but it doesn't work.

For example:

<tree create="false" edit="false" delete="false">
    <field name="name" readonly="1"/>
    <button name="action_name" type="object" string="Active" icon="gtk-edit"/>
</tree>
1
shameem@aχoncoms
On 10/20/16, 3:59 AM

Hi Jeferson

It is not good solution, You can solve your problem temporarily

Create an additional field and set its value your label

Example

in python

label = fields.Char(default="Active")

in xml

<button name="action_name" type="object" string="Active" icon="gtk-edit"/>
<field name="label" string=" "/>



Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/19/16, 10:09 AM
Seen: 218 times
Last updated: 10/20/16, 3:59 AM