Odoo Help

Welcome!

This community 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.

1

Using status widget with fields not named state?

By
mike
on 4/30/13, 3:21 PM 2,080 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 (SA)
on 5/1/13, 2:43 AM
1

Naresh Soni (nch)

--Naresh Soni (nch)--
Tiny ERP Pvt Ltd
http://www.odoo.com
1281
| 2 2 4
India
--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 !

Thanks,

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?

mike
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?

mike
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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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