콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1096 화면

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.

아바타
취소
베스트 답변

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

아바타
취소
작성자

I have installed MuK Backend Theme then uninstalled it.

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

작성자

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

작성자

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

작성자

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

작성자

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

관련 게시물 답글 화면 활동
1
9월 21
8975
1
1월 24
16612
0
3월 15
2964
1
3월 15
9529
1
5월 24
1160