Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1564 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

I have installed MuK Backend Theme then uninstalled it.

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

Autor

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

Autor

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

Autor

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

Autor

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

Powiązane posty Odpowiedzi Widoki Czynność
1
wrz 21
9349
1
sty 24
16947
0
mar 15
3256
1
mar 15
9845
1
maj 24
1410