Odoo Help


Using status widget with fields not named state?

on 4/30/13, 3:21 PM 3,284 views

I want to use the statusbar widget with a field named status. However this results in Client Errors apparently because I'm not using a field named state for this widget. In this custom model state and status are quite different things and not interchangeable so I cannot just switch fields. I also do not need to display state at all. Is there some way around this limitation?

I think statusbar widget is only used with selection fields.

Sudhir Arya (ERP Harbor Consulting Services)
on 5/1/13, 2:43 AM

Naresh Soni (nch)

--Naresh Soni (nch)--
--Naresh Soni (nch)--

Team Lead, Odoo(Formerly OpenERP) Support & OPW

Naresh Soni (nch)
On 5/1/13, 4:56 AM

Hi Mike,

It should work normal as long as your field is of type selection / many2one. widget=statusbar should work. There is no MUST HAVE (name=state) for this widget.Check the example in project issue model the field stage_id is a many2one and used as widget=statusbar.

Hope this helps !


I have the statusbar for another model used on the selection field "state" and it works as expected. On this model I try using it with a selection field named status and it results in this even though the code is almost identical to the other model - client error unknown field state in domain (state = decertified) is it because I set one the button attribute "states" to "decertified"? Perhaps the "states" attribute only works with fields named state?

on 5/1/13, 10:25 AM

yes the attribute 'states' on button will work only if you have 'state' field in your model.

Naresh Soni (nch)
on 5/1/13, 10:39 AM

Yes this is the problem. Since I cannot use the buttons I now need a normal select widget for this field. Can I use that and still use the statusbar since they will be set to the same field?

on 5/1/13, 10:51 AM

yes as I said " It should work normal as long as your field is of type selection / many2one" but the states attribute on button will work only with 'state' field.

Naresh Soni (nch)
on 5/1/13, 1:43 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/30/13, 3:21 PM
Seen: 3284 times
Last updated: 3/16/15, 8:10 AM