Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3101 Представления

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?

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
авг. 23
3107
1
мая 23
3052
1
янв. 24
1798
0
мая 23
1234
2
дек. 22
4384