콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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?

아바타
취소
관련 게시물 답글 화면 활동
1
8월 23
3538
1
5월 23
3484
1
1월 24
2124
0
5월 23
1691
2
12월 22
5130