Hi, I am trying to add a new combobox to re.partner (added field for customers). It is intended to provide an informative payment method selection and it should appear right after property_payment_term in the customer acountability tab.
This is my __init__.py:
from . import invoice_payment_method
this is my __openerp__.py:
{
'name': 'Payment Method Selection',
'description': 'Provides a new field to select payment method as per customer',
'author': 'E.M.',
'depends': ['base', 'account' ],
'data': ['invoice_payment_method.xml', ],
}
This is my invoice_payment_method.py:
# -*- coding: utf-8 -*-
from openerp import models, fields, api, exceptions
class invoice_payment_method(models.Model):
_inherit = "res.partner"
payment_method = fields.Selection(selection=[('bank_transfer', 'Transferencia Bancaria'),
('check', 'Cheque'),
('confirming', 'Confirming'),
string='Método de pago')
And this is invoice_payment_method.xml:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="payment_method">
<field name="name">payment_method</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='property_payment_term']" position="after">
<field name="payment_method"/>
</xpath>
</field>
</record>
</data>
</openerp>
Could anyone help me to identify what I am missing or how to further troubleshoot?