Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
874 Tampilan

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.

Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Penulis

I have installed MuK Backend Theme then uninstalled it.

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

Penulis

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

Penulis

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

Penulis

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

Penulis

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

Post Terkait Replies Tampilan Aktivitas
1
Sep 21
8718
1
Jan 24
16444
0
Mar 15
2856
1
Mar 15
9430
1
Mei 24
983