Odoo Help


Got error " Field `message_follower_ids` does not exist" without not calling this field in view

Phong Vy
on 11/22/16, 5:48 AM 787 views

this is my view file

 <record id='social_insurance_tab' model='ir.ui.view'>
     <field name='social.insurance.tab'></field>

     <field name='model'>hr.insurance</field>

    <field name='inherit_id' ref='hr.view_employee_form'></field>

    <field name='arch' type='xml'>


             <xpath expr="//notebook" position="inside">

                     <page string='Insurance'>

                             <field name='name'></field>





here is my models file

from openerp import models, fields, api
class hr_insurance(models.Model):
     _name = 'hr.insurance'

     name = fields.Many2one('hr.contract', 'Insurance', required=True)

Just a simple code to add new tab into Employee but I got error : "ParseError: "Invalid view definition

Error details:

Field `message_follower_ids` does not exist"

without I don't call field "message_follower_ids" into my inherit view, how can I resolve this ? 


Jignesh Mehta

--Jignesh Mehta--
| 6 5 8
Surat, India
--Jignesh Mehta--

- I have 3+ years of Industry Experience, specializing Odoo Development, Analysis, Customization, Implementation, Integration.
- I have done many Customization modules in Sale, Purchase, Point of Sale, Inventory, CRM and much more. Also Worked in the Odoo Themes like Business Theme or E-Commerce Theme.
- Develop Jewelery Manufacturing process from Scratch. It have more than 10 Department. Develop PDF and Excel reports for this project around 150 per format.

Jignesh Mehta
On 6/9/17, 8:07 AM

Hello Phong Vy,

You inherit hr.employee view and you used model hr.insurance. That is wrong. If you want to add insurance field hr.employee model then you inherit the hr.employee and add in employee form.


class Employee(models.Model)

     _inherit = 'hr.employee'

     insurance_id = fields.Many2one('hr.insurance', 'Insurance')

class Insurance(models.Model)

     _inherit = 'hr.insurance'

     name = fields.Char('Insurance')

Now you can inherit hr employee view and add in it.

<record id="social_insurance_tab" model="ir.ui.view">
     <field name="name">social.insurance.tab'</field>

     <field name="model">hr.employeefield>

    <field name='inherit_id' ref='hr.view_employee_form'></field>

    <field name='arch' type='xml'>


             <xpath expr="//notebook" position="inside">

                     <page string='Insurance'>

                             <field name='insurance_id'></field>






Hope this will helps you.


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/22/16, 5:48 AM
Seen: 787 times
Last updated: 6/9/17, 8:07 AM