İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
6385 Görünümler

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"/>
Avatar
Vazgeç

Did you add the field in the header ?

Üretici

Yes i did

En İyi Yanıt

Please use below code-

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


Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
4
May 24
7126
1
Tem 23
2291
3
Haz 23
3160
4
Haz 22
4848
3
Nis 22
5461