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

I create a status bar for a model but view field does not load properly. (odoo v12)

the below code only shows the text of the current set status. But with the same set of code i'm able to load all the status properly in a different model.

i'm unable to paste the image here, to show the actual result. need help for that too.

python: 

status = fields.Selection([
('draft', 'Draft'),
('posted', 'Posted'),
('active', 'Active'),
('closed', 'Closed'),],string='Status Type', required = True,default = 'draft')

xml:

<field name="status" widget="statusbar" options="{'fold_field': 'fold'}" readonly="1"/>
아바타
취소

Did you add the field in the header ?

작성자

Yes i did

베스트 답변

Please use below code-

<field name="status" widget="statusbar"/>
options="{'fold_field': 'fold'}" is used in many2one staus fileds.


아바타
취소
관련 게시물 답글 화면 활동
4
5월 24
7311
1
7월 23
2400
3
6월 23
3282
4
6월 22
5024
3
4월 22
5641