user_id = fields.Many2one('hr.employee', string='Employee', default=lambda self: self.env.user, tracking=True)i did not delet any record and its working on local but when i create create record on testing instance it give me above error.
user_id = fields.Many2one('hr.employee', string='Employee', default=lambda self: self.env.user, tracking=True)i did not delet any record and its working on local but when i create create record on testing instance it give me above error.
Hello your field definition model is hr.employee while you have default=lambda self: self.env.user, i think this is not true at all
user_id = fields.Many2one('res.users', string='Employee', default=lambda self: self.env.user, tracking=True)change model 'hr.employee' to 'res.users'., it will be work.
Thanks
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký| Bài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
|---|---|---|---|---|
|
1
thg 12 25
|
2086 | |||
|
2
thg 2 21
|
9699 | |||
|
1
thg 3 24
|
3656 | |||
|
How can I recover ownership?
Đã xử lý
|
1
thg 2 23
|
3966 | ||
|
Odoo database failed
Đã xử lý
|
1
thg 12 22
|
14361 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.