Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
10379 Lượt xem

In my instance Odoo the status bar is divided into two lines me. An example to reproduce this:

1.- Register a sales order

2.- Save record

3.- Refresh Screen

Once existing orders consult the status bar is split into two lines like the image below. Has it occurred to anyone?


[IMG=http://www.image-share.com/upload/3064/251.png]

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Fernando

Your image doesn't shows up, it' doesn't work yet to upload images to Odoo forum, but you could add as an external URL

For what you refers there are some options according for what you wanna fix. For example if what you see as a problem is that buttons shows in one line and statusbar states shows in another, that it's caused by the css:

.openerp .oe_form > :not(.oe_form_nosheet) header ul:not(.oe_tooltip_technical):not(.oe_dropdown_menu), .openerp .oe_form > .oe_form_nosheet header ul:not(.oe_tooltip_technical):not(.oe_dropdown_menu) {
display: inline-block;
float: right;
}

And could be solved by just adding: "float: right !important;" to that rules.

If what you want is that do not split the statusbar due to the number of states it may have, you could fold your states in a dropdown menu but for that you need to convert your states field to a many2one for use it with the widget statusbar. In the model of that many2one you need a boolean field indicating that the record goes to the dropdown menu or not. Take as example project.task with project.task.type models. In the project task form the stage_id field is defined like this:

<field name="stage_id" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>

 Hope this helps

Ảnh đại diện
Huỷ bỏ

Hi Alex, do we need to update the web module after making this change? Because I tried changing the rule and it doesn't seem to be working for me.

Tác giả

I do not get to show the image on the question of the forum. No META tag that must be put. Thank you.

Tác giả Câu trả lời hay nhất

Hello,

    I've got to be displayed on a single line. Axel, the rule for buttons are missing. Would look like:

.openerp .oe_form > :not(.oe_form_nosheet) header ul:not(.oe_tooltip_technical):not(.oe_dropdown_menu), .openerp .oe_form > .oe_form_nosheet header ul:not(.oe_tooltip_technical):not(.oe_dropdown_menu) {
display: inline-block;
float: right !important;
}

.openerp .oe_form > :not(.oe_form_nosheet) header button:not(.oe_tooltip_technical):not(.oe_dropdown_menu), .openerp .oe_form > .oe_form_nosheet header button:not(.oe_tooltip_technical):not(.oe_dropdown_menu) {
display: inline-block;
float: left !important;
}

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Yes this is an irritating issue. The only resolution that has worked for me so far is by placing a <div> wrapper followed by a <div class="oe_clear" />:

<div>
<button name="..." />
<field name="state" widget="statusbar" />
</div>
<div class="oe_clear" />

Doing this for custom modules is fine, but it is obviously not an option to inherit all modules and add this code.




Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 25
428
2
thg 7 25
607
1
thg 7 25
550
2
thg 7 25
578
1
thg 6 25
587