İçereği Atla
Menü
This question has been flagged
3163 Görünümler

Hi, i have a view that has a couple of fields, including a one2many field that I show using a tree:


tree editable="bottom">

field name="sequence" widget="handle"/>

field name="crane_type_id"/>

field name="crane_span"/>

field name="crane_length"/>

button class="btn-primary" id="insidetree" string="TEST" type="object" name="get_token_from_type_line"/>

/tree>


    

I also have a javascript file that would add an event to this button when clicked, but this is not working. To test I made a new button that i put outside of the tree view and this one does do the function, but the one inside the listview does not work.


Here is the javascript code:

var ActionManager = require('web.ActionManager');

ActionManager.include({

events:{

'click #outsidetree': '_executeURLAction',

'click #insidetree': '_test'

},

_executeURLAction: function (element) {

console.log("test outside, this works")

console.log(element)

},

_test: function (element) {

console.log("test inside, does not work")

}

})


I already tried adding eventlisteners on load, normal onload, DOMcontentloaded and tried checking the onreadystatechange, but none of that helps in that regard. Do buttons inside tree views just not work?

Avatar
Vazgeç
Related Posts Cevaplar Görünümler Aktivite
1
Ağu 23
3219
1
May 23
3167
1
Oca 24
1853
0
May 23
1293
2
Ara 22
4477