Hello I am trying to add a field for account.invoice, here is the .py code:
# -*- coding: utf-8 -*-
from openerp import fields, api, exceptions, models
class account_invoice(models.Model):
_inherit = 'account.invoice'
nit = fields.Char(string='NIT', help='Número de identificación tributaria', related='partner_id.nit', store=False)
And here is my XML file:
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="inoice_nit" model="ir.ui.view">
<field name="name">account.invoice.nit</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_tree"/>
<field name="arch" type="xml">
<tree position="inside" >
<field name="nit" />
</tree>
</field>
</record>
</data>
</openerp>