I have Odoo v8
In the list view i want a value(vat) from the partner that is selected in the invoice.
I have tried <field name="partner_id.vat"/> but that doesn't work.
partner_id is a many to one field. Vat is a char field.
How can i do that?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have Odoo v8
In the list view i want a value(vat) from the partner that is selected in the invoice.
I have tried <field name="partner_id.vat"/> but that doesn't work.
partner_id is a many to one field. Vat is a char field.
How can i do that?
You can create a related (v7) / related (v8) field for that.
Ex:
# For older version style
_columns = {
'partner_vat': fields.related('partner_id.vat', type='char', string='Vat')
}
# For API version style
partner_vat = fields.Char(related='partner_id.vat', string='Vat')
Add this field in tree view.
Sudhir Arya ERP Harbor Consulting Services skype: sudhir@erpharbor.com website: http://www.erpharbor.com
Sorry i am new to this.
Where can i make a related field?
In your custom module, inherit account.invoice object and add the related field as I said in my answer.
Do i need a custom module for that?
Yes, you will have to create a custom module for that.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up