Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5666 มุมมอง

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'

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 23
2183
1
ก.ค. 18
7841
0
ก.พ. 18
7549
Hide menu for all except specific group แก้ไขแล้ว
1
พ.ย. 22
3321
Live tracking in odoo. แก้ไขแล้ว
2
ส.ค. 22
7663