Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
12242 Visualizzazioni

I created a new custom model and added it to a menu. Now I can see the list view, but it contains only one of the fields - and a relatively unimportant one. How can I change the list view, so that other fields are show as well?

Avatar
Abbandona
Risposta migliore

Hello,

You have to create a tree_view for your model.

default one is like this:

<?xml version="1.0"?>
<tree string="My view">
    <field name="name"/>
</tree>

just update the default one by adding fields you need:

<?xml version="1.0"?>
<tree string="My view">
    <field name="name"/>
        <field name="my_first_field"/>
        <field name="one_other"/>
</tree>

To do this, enter developper mode got to your list view, and click on upper left selection box and choose "Edit TreeView"

You will see this popup:

image description

enter name, model and change list of fields you want to have.

Avatar
Abbandona
Autore

Thanks, this works like a charm.

Post correlati Risposte Visualizzazioni Attività
2
lug 23
6679
1
mar 21
4795
2
mar 22
2864
2
mar 25
952
2
apr 24
1412