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

Hello People,

i want to use read() method only in  List view (tree view) to perform some custom opeartions . in form view i don't wan't to do any operations.

So how can i identify or get current view in read() method of odoo ?

Thanks!


아바타
취소

Hi

by using fields_view_get we can identify the view_type

@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False):
    res = super(your class, self).fields_view_get(view_id,
    view_type, toolbar=toolbar, submenu=submenu)
    return res

작성자

Thanks for the answer !

But Actually i need to check in read() method only. as i want to alter the content of field which is being displayed in listview. fields_view_get, in this method am not getting actual data of field so.

관련 게시물 답글 화면 활동
2
8월 25
2365
1
7월 25
877
1
8월 25
1151
0
5월 25
1329
2
4월 25
3531