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.

0

Enable button in treeview

By
Anuradha
on 9/26/13, 3:24 AM 2,362 views
Hi i added a button of type object in my xml which will play a mp3. But it disables automatically if i click it once ,I didnt write any code for that, it automatically adds disabled="disabled" for that button. How to prevent that? or how can i remove disable property. if i onclick for that button it shows xml error.Any one please help!!
My code is
<record id="voipdata_tree_view" model="ir.ui.view">
            <field name="name">File Details</field>
            <field name="model">filedata</field>
            <field name="priority" eval="1"/>
            <field name="type">tree</field>
            <field name="arch" type="xml">
            <tree string="File Names" >
                <field name="file_name" />
                <field name="time_created" string="Time Created"/>
                <field name="size" string="Size"/>
                <field name="file_object" string="Download or Play" filename="file_name"/>
                <button name="play_file" type="object" string="Play" icon="gtk-media-play" onclick="reove_hie()" />
            </tree>
            </field>
            </record>
0
Abdul Nazar
On 12/18/13, 4:36 AM

If you are write the function for play into python.you can write like below code. <button name="reove_hie" type="object" string="Play" icon="gtk-media-play"/> here not need onclick .

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

0 follower(s)

Stats

Asked: 9/26/13, 3:24 AM
Seen: 2362 times
Last updated: 3/16/15, 8:10 AM