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

My model Autogallery has a function check(self,value) and one2many field car_ids. Inside product_ids there is a float field product_size. I would like to highlight my tree with respect to wheel_size. I cannot  introduce a computed field in Car, because method check() refers to the fields inside Autogallery, so it will return different values for different Autogallery.  Is it possible to call function in expression for colors? If not, what implementation is possible?


a snippet of Autogallery view

<field name="car_ids" widget="one2many_list">
<tree string="R" colors="???self.check('wheel_id')???">
<field name="wheel_size"/>
아바타
취소
작성자

Correction

Model Car has a float field wheel_size.

instead: Inside product_ids there is a float field product_size.

작성자 베스트 답변

Shurshilov,

You are recommending to add another field to the model, which I would like to avoid, but looks like it is the only solution. I am still looking for an implementation with direct compute of the color. 

Thanks

아바타
취소
베스트 답변

Hi, see my answer

https://www.odoo.com/forum/help-1/question/odoo-xml-compare-field-with-character-126560#answer-126565

아바타
취소
관련 게시물 답글 화면 활동
3
4월 24
2400
0
12월 19
5659
3
8월 22
7390
1
2월 22
9728
4
7월 16
5138