跳至內容
選單
此問題已被標幟
5675 瀏覽次數

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'

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
5月 23
2194
1
7月 18
7848
0
2月 18
7564
1
11月 22
3330
2
8月 22
7669