Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
5717 Visualizzazioni

Hi!

Here is a part of hr.employee model: 

class Employee(models.Model):
_name = "hr.employee"
_description = "Employee"
address_home_id = fields.Many2one('res.partner', 'Private Address', help='Enter here the private address of the employee, not the one linked to your company.', groups="hr.group_hr_user")

I am trying to override it in my module:

class HrEmployee(models.Model):
_inherit = 'hr.employee'
address_home_id = fields.Char(string='Home Address')

But when I install my module there is an error:

AttributeError: 'NoneType' object has no attribute '_fields'

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mag 23
2219
1
lug 18
7869
0
feb 18
7604
1
nov 22
3360
2
ago 22
7696