Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I created a field of type selection, this is my Python code:
('not_coming', 'Not coming'),
'State', size=16, readonly=True),
I'm trying to see it as a status bar, and this is my XML code:
<form string="Event Meeting Registration" version="7.0">
<button name="move_to_cancelled" string="Cancel Registration"
<field name="state" nolabel="1" widget="statusbar"
The result: I can see the button and the status bar, but the button is a line above the status bar, and the status bar is not highlighting the current state. For example, I open a record with th state draft, and this state is not highlighted, is grey like the other ones, and you can't know which state the object is in.
How can I align the button to the status bar? I tried to put the button and the field state between div tags, and even set their styles with foalt left and right, but when I did that, I wasn't able to see the status bar (I think the button occupies the whole line and the status bar was behind the button).
How can I see the current state highlighted?
Thank you in advance.
Ok, I got the solution to both problems.
In addition to having state in the header, I had it in the form sheet too, this way:
I had to remove that line, and when I did, both problems were solved at the moment. Hope it helps to anyone.
I was able to solve it that way in OpenERP 7, but now, in Odoo 8, I have just faced the same problem and this time I was able to solve it putting the buttons and the field state inside the same <div>. So I guess if you have this problem, here you can find two possibilities in order to fix it.
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 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/1/14, 9:35 AM|
|Seen: 1163 times|
|Last updated: 8/10/15, 6:09 PM|