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

Why I cant able to store the particular value in the grid table after making that field as readonly

Since I gave that field as store=True

아바타
취소
작성자

Thanks,,, ayman mohammed adam

베스트 답변

You want the field to be Readonly, but trying to add value through Onchange or so, then you need to under-go hassle of updating for the same again in the Create/Write ORM methods.

Instead the feasible alternate solution would be you to use Compute/functional fields.

Api decorator lets you add depends(dependency) field, which acts as both onchange and computational method, that way you don't have to worry about manually re-updating the same in ORM methods.


Note:

If a field is marked as Readonly, odoo will explicitly omit retrieving data for the same from UI, hence in such case its best to use computational/related fields.


아바타
취소
작성자 베스트 답변

 

아바타
취소
베스트 답변

dear Karan Gupta

you need to override create and write method and assign the value again by calling your onchange function and then update the vals.

아바타
취소
관련 게시물 답글 화면 활동
2
12월 23
2036
3
5월 25
1881
1
4월 25
1417
3
9월 24
14373
2
2월 24
2583