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

Hi, Where i can get action ID (162) and put it to parameters in URL ?
i set href to a button like this

/web&debug=#id=1&view_type=form&model=res.partner.task&menu_id=126&action=162 

but i get error web.assets_backend.js:427 No type for action 


Thanks




아바타
취소
베스트 답변

Hello simes

I think use like this, it's helpful for you.
action_id = self.env.ref('module_name.action_id', , raise_if_not_found=False)

Ex.
web&debug=#id=1&view_type=form&model=res.partner.task&menu_id=126&action=action_id.id

아바타
취소
작성자

action_id = self.env.ref('contacts.Contacts',

raise_if_not_found=False)

print(action_id) // i got None

not work got error AttributeError: 'NoneType' object has no attribute 'id'

action_id = self.env.ref('module_name.action_id')

작성자

tks it work

i go in form view click debug -> edit action -> get External ID

action_id = self.env.ref('External ID')

print(action_id.id) // 167

관련 게시물 답글 화면 활동
Why XML in odoo ? 해결 완료
3
3월 25
1043
Odoo action error 해결 완료
1
10월 24
5489
0
12월 22
1922
1
2월 18
5379
4
11월 24
76416