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
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
1
déc. 25
|
2093 | |||
|
2
févr. 21
|
9707 | |||
|
1
mars 24
|
3672 | |||
|
How can I recover ownership?
Résolu
|
1
févr. 23
|
3979 | ||
|
Odoo database failed
Résolu
|
1
déc. 22
|
14371 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.