Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
6316 Prikazi

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
Opusti

Did you add the field in the header ?

Avtor

Yes i did

Best Answer

Please use below code-

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


Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
4
maj 24
7001
1
jul. 23
2266
3
jun. 23
3101
4
jun. 22
4773
3
apr. 22
5387