Skip to Content
Menu
This question has been flagged
1 Reply
1445 Views

I'm trying to add a field in an existing module view , but it doesn't recognize my field , can someone help me , here is everything you would need

here is the error : " Field "Role" does not exist in model "hr.employee"

here is the view code : 

  1.  
    benevole_field
    hr.employee












    and here is the model : "from odoo import models, fields, api


    class reseau_de_proche_benevole(models.Model):
    _inherit = 'hr.employee'
    _name = "reseau_de_proche_benevole"
    Role = fields.Selection([
    ('benevole', 'benevole'),
    ('employee', 'employee'),
    ]) "
Avatar
Discard
Best Answer

You don't need to write _name , so simply delete this line _name = "reseau_de_proche_benevole"

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
1485
1
Nov 24
1193
2
Sep 24
1047
1
Aug 24
2454
3
Aug 24
2687