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

Here is the code 

<record model="ir.ui.view" id="fleetwiki_record_form_view" >

<field name="name">fleetwiki.record.form.view</field>

<field name="model">fleetwiki.record</field>

<field name="type">form</field>

<field name="arch" type="xml">

<form string="Record">

<field name="name" select="1"/>

<field name="dateentered"/>

<field name="classification_id"/>

<field name="ip"/>

<field name="location"/>

<field name="os"/>

<field name="user"/>

<field name="password"/>

<field name="info"/>

</form>

</field>

</record>

Odoo reads the custom views and then the form is all the fields unformatted without labels?


Awatar
Odrzuć

Thank you, I was able to get it working now.

Najlepsza odpowiedź

You need to put group tags in.  Bare minimum, just put a group tag inside the form, then every field in that group.  If you want to get fancier, you'll need to use divs and classes.  You may also want to mask the password field values.  Check out the documentation on views

Here's an example of a few formatting additions:

<record model="ir.ui.view" id="fleetwiki_record_form_view" >

<field name="name">fleetwiki.record.form.view</field>
<field name="model">fleetwiki.record</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Record">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
</div>
<group>
<group string="This Section">
<field name="dateentered"/>
<field name="classification_id"/>
</group>
<group string="Other Section">
<field name="ip"/>
<field name="location"/>
<field name="os"/>
<field name="user"/>
<field name="password" password="True"/>
<field name="info"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lut 23
1760
1
mar 15
3554
3
maj 24
2803
1
lis 22
3093
1
wrz 22
2501