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

Hello 

i have this view form  

  <record model="ir.ui.view" id="carpooling_form_view">
<field name="name">carpooling.carpooling.form</field>
<field name="model">carpooling.carpooling</field>
<field name="arch" type="xml">
<form string="Pooling">
<header>
<button class="btn-primary" name="bnt_find" string="Find" type="object"/>
<button class="btn-secondary" name="cancel_btn" string="Cancel pooling" type="object" />
<field name="state" widget="statusbar" />
</header>
<sheet>
<group>
<group>
<field name="name"/>
<field name="taken_seats"/>
<field name="departure_time"/>
</group>
<group>
<field name="departure_date"/>
<field name="note"/>
<field name="state"/>
</group>
</group>
</sheet>
</form>
</field>
</record>

Is it normal that it is aligned to the left ? 

in all the tutorials that I have seen, it is centered, what's wrong or it is necessary to add extra classes.

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

Hi Yahia

your code looks fine

can you check if you have installed a module or theme that is overriding the css of odoo?

Daniel

Ảnh đại diện
Huỷ bỏ
Tác giả

I have installed MuK Backend Theme then uninstalled it.

did you regenerate the assets?
activate debug mode
debug menu -> regenerate assets

Tác giả

yes i do but , i still have the view aligned to the left, it seem that the right space is reserved for chatter, i tried on an other environment and a the right side i have a scroll bar (i am using Odoo 17 )
and other modules all have the chatter in the right

Tác giả

there is even a module to hide the chatter https://apps.odoo.com/apps/modules/16.0/hide_chatter

can you uninstall hide_chatter?
or at least run your code in a test envirement without 3rd party module? just to be sure that no extra module is causing the issue, becuase your Form declaration is correct

Tác giả

I tested with a new clean install it's the same thing, I think it's normal behavior, maybe given my 27 inch screen with QHD resolution they set a max width, when I reduce the size of the browser the window centers well.

on the other hand with version 15 of odoo it is centered despite the size or resolution of my screen


"I think it's normal behavior, maybe given my 27 inch screen with QHD resolution they set a max width, when I reduce the size of the browser the window centers well."=>
Does all odoo standard view looks not centered then or only your custom one
If so, I will advise you to create a ticket to odoo to fix that

Tác giả

almost all models have the chatter, but I finally found a view in the inventory ( Moves History) module which is aligned to the left as in my module

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 21
9596
1
thg 1 24
17202
0
thg 3 15
3443
1
thg 3 15
10131
1
thg 5 24
1682