I need to realize this function for backend form view:
inherited XML:
<div id="target">Click here</div>
Javascript:
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Thanks in advance for example or link.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I need to realize this function for backend form view:
inherited XML:
<div id="target">Click here</div>
Javascript:
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Thanks in advance for example or link.
I found a solution:
Javascript:
openerp.my_module= function(instance) {
instance.web.FormView = instance.web.FormView.extend({
events: {
'click #target': 'button_clicked',
},
button_clicked: function() {
alert('Handler for .click() called.')
},
});
}
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Dec 22
|
2374 | ||
|
1
Nov 19
|
18312 | ||
|
0
Dec 21
|
3779 | ||
|
1
Jun 25
|
440 | ||
|
1
Jun 25
|
375 |