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

could someone please explain what i've done wrong with this code as the field will not appear in odoo


<odoo>
<record id="view_res_partner_form_inherit" model="ir.ui.view">
<field name="name">DRS Company Custom Fields</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='lang']" position="after">
<field name="k_code" string="Supplier"/>
</xpath>
</field>
</record>
</odoo>


อวตาร
ละทิ้ง

Look odoo inheritance: https://goo.gl/4Zyc9d

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

Hello Leke,

Try with the following code, and don't forgot added your xml file on __manifest__.py/__openerp__.py
after restart the server please upgrade your custom module.

<record id="view_res_partner_form_inherit" model="ir.ui.view">
<field name="name">DRS Company Custom Fields</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="lang" position="after">
<field name="k_code" string="Supplier"/>
</field>
</field>
</record>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

make yourself sure that you register this file into the __manifest__.py file

and also check that the form of res_partner is not replaced at anywhere 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ส.ค. 21
3345
1
ก.ย. 20
4036
2
พ.ย. 24
1902
2
มี.ค. 23
3474
4
ธ.ค. 23
18232