콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4615 화면
<xpath expr="//tree" position="attributes">
<attribute
name="decoration-danger">product_id ==</attribute>
</xpath>

In Odoo 12, I would like to pass a value of a certain product id, that i have defined in data.xml and i would like to use self.env.ref('my_module.my_product_id).id  for this equation. This way the order line product would stand out with a red color, the code works if i go for 'product_id == 420' but i cant use a function? Any idea for this solution? Thank you

아바타
취소

Hello Sir. Did you find a solution for this ?

베스트 답변

i think you can't do that.

what you can do is give a context to the action, and the action decides which view will be use based on the data stored in the context

아바타
취소
관련 게시물 답글 화면 활동
Chatter in models 해결 완료
1
3월 22
2532
2
1월 21
4405
2
6월 19
3531
0
3월 24
1206
5
9월 24
52039