I had created a new field in res.partner Model using this code and modified the form view of Partner to display the new field, and it worked very well. Now I am trying to refer to the new field in the Invoice View and make it get added to the Print Invoice. I don't know how to do it. I tried different ways but nothing works. Could you help me please? I searched many hours on this and other forums but nothing. i'm working with odoo 8, Please Help me. Thanks!
.py file
from openerp.osv import osv, fields
class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'clientes_rnc_ced': fields.char('RNC o Cédula',size=12),
}
res_partner()
XML file
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="clientes_atributos_form" model="ir.ui.view">
<field name="name">clientes.atributos.form</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="ref" position="after">
<field name="clientes_rnc_ced" />
</field>
</field>
</record>
<record id="clientes_atributos_tree" model="ir.ui.view">
<field name="name">clientes.atributos.tree</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<field name="display_name" position="before">
<field name="clientes_rnc_ced" />
</field>
</field>
</record>
</data>
</openerp>