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
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|
1
dic 25
|
2091 | |||
|
2
feb 21
|
9706 | |||
|
1
mar 24
|
3665 | |||
|
How can I recover ownership?
Risolto
|
1
feb 23
|
3971 | ||
|
Odoo database failed
Risolto
|
1
dic 22
|
14369 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.