<odoo>
<data>
<!-- explicit list view definition -->
<record model="ir.ui.view" id="patient_tree">
<field name="name">hospital.patient.tree</field>
<field name="model">hospital.patient</field>
<field name="arch" type="xml">
<tree string="Patients">
<field name="name"/>
<field name="age"/>
<field name="notes"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="patient_form">
<field name="name">hospital.patient.form</field>
<field name="model">hospital.patient</field>
<field name="arch" type="xml">
<form string="Patients">
<sheet>
<group>
<field name="name"/>
<field name="age"/>
<field name="notes"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_patient">
<field name="name">Patients</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hospital.patient</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create a new Patient.
</p>
</field>
</record>
<menuitem id="hospital_root" name="Hospital" sequence="0"/>
<menuitem id="hospital_patient" name="Patients" parent="hospital_root" action="action_patient"/>
IN my models.py :
from odoo import models, fields, api
class mymodule(models.Model):
_name = 'hospital.patient'
_description = 'Patient Records'
name = fields.Char(string='Name')
age = fields.Integer(string="Age")
notes = fields.Text(string="Notes")
Only the "Name" column is showed in tree view. Please help me.