This question has been flagged
3646 Views

Xml:

<record id=“rec_id” model="ir.ui.view">
        <field name="name">Demo</field>
        <field name="model">model.name</field>
        <field name="arch" type="xml">
            <form string=“Demo”>
                <header>
                    <h1>
                        <table align="center"class="Demo_class">
                            <tr>
                                <td align="center">
                                    <input   type="button" id=“demo_id” string=“Demo Button” class=“find_button”/> 
                                </td>
                            <tr>
                        </table>
                    </h1>
                 </header>
            </form>
        </field>
        </record>
Js:
var DemoClass = form_common.FormWidget.extend(form_common.ReinitializeWidgetMixin, {

events : {
'click .find_button':'find_button',
},

init: function() {
    this._super.apply(this, arguments);
}

find_button : function(){
    console.log("Click Event Called")
},

});

Issue: This is my code i just want to bind click event to specific Css selector ".find_button" but this code has not worked. Any one help me to resolve this problem.


Avatar
Discard