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

I'd like to know if someone have an ideia how I can check if an element exists in a template that inherits or calls other one.

아바타
취소

Actually, if an element doesn't exist, you will get error log when upgrading module.

베스트 답변

As long as I know there is none about that in Odoo but it's not difficult to get it done developing a new QWeb tag to check that. You just need to be aware of where do you need to check, in the local template you supposedly are not on the top and if you wanna check from the top you need to get the same template name/id from the qwebcontext, on another template you need to pass the template name/id to the tag call so you could get the arch to check the xpath expressions. The result could be set into qwebcontext or maybe will be even helpful to set it to qwebcontext and instead evaluate the tag body of the new tag. This are just dropped ideas

아바타
취소
관련 게시물 답글 화면 활동
0
6월 15
4969
4
12월 23
18443
0
4월 21
1830
1
7월 25
2269
2
5월 24
3004