Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
8836 มุมมอง

Hello, sorry this is probably somewhere but I couldn't find it,

I there a way of easily changing the fields that are displayed on a list view?

Say for customers I want to display 4 fields (adding town or postcode)

Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Mark,

Guillaume has explained very well the UI part.

You must not forget to add the necessary custom fields on the class files.

Thanks.

อวตาร
ละทิ้ง
ผู้เขียน

Thanks Serpent, don't know about this, I suppose I expect(ed) just to be able to click check boxes to display existing partner fields.

Mark, In a custom module, you have to add by custom. Or if you have opened in debug mode, you would be able to add in the view!

คำตอบที่ดีที่สุด

hi, you can inherit the view 'view_partner_tree' found in : addons/base/res/res_partner_view.xml

Something like this in your module xml file : 

 <record id="inherit_view_partner_tree" model="ir.ui.view">
            <field name="name">res.partner.tree</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_tree" />
            <field name="arch" type="xml">
                <field name="email" position="after">
                     <field name="field_town_name" />
                     <field name="field_postcode_name" />
                </field>
            </field>
</record>

อวตาร
ละทิ้ง