Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3170 Weergaven

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
aug. 23
3227
1
mei 23
3187
1
jan. 24
1860
0
mei 23
1299
2
dec. 22
4489