Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
14005 Visualizzazioni

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>


Avatar
Abbandona

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

Risposta migliore

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>
Avatar
Abbandona
Risposta migliore

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 

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
ago 21
3343
1
set 20
4036
2
nov 24
1899
2
mar 23
3474
4
dic 23
18227