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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
Create an account today to enjoy exclusive features and engage with our awesome community!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
2
лют. 21
|
7527 | ||
|
1
бер. 24
|
1826 | ||
How can I recover ownership?
Вирішено
|
|
1
лют. 23
|
2127 | |
Odoo database failed
Вирішено
|
|
1
груд. 22
|
11738 | |
Edit Company data Powered by Odoo
Вирішено
|
|
6
черв. 15
|
7986 |