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

i need form view like the view in base.res_partner_view.xml but i should use different model.so anyone can help me..

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

you have to inherit the resource partner class on your new module like this way: _inherit = 'res.partner' and in a columns section you can add the fields which you wanted in your module.

now you have to inherit the resource partner view also in xml like this way.. <record id="view_partner_form" model="ir.ui.view"> <field name="name">res.partner.form</field> <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form"/> <field name="arch" type="xml">

now you have to give your custom filed position in to this view like this

<field name="email" position="replace"> <field name="gmail"/> <field name="skype"/> </field>

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
View inheritance แก้ไขแล้ว
1
มี.ค. 20
3409
12
ธ.ค. 18
34709
1
ก.ค. 16
7023
2
มี.ค. 15
5898
0
มี.ค. 15
3836