Odoo Help

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 317 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
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=" "/>



About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

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