Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6650 Vistas

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
Descartar

Did you add the field in the header ?

Autor

Yes i did

Mejor respuesta

Please use below code-

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


Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
4
may 24
7512
1
jul 23
2495
3
jun 23
3458
4
jun 22
5207
3
abr 22
5835